Posts

Showing posts from February, 2012

i want to add intent in main activity -

You want to take the name of the person for the next activity and if the login is not ok, it will show the toast that it does not work And just show the toast. What should be included in the next activity and what is wrong with this code @Override protected void onCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState ); SetContentView (R.layout.activity_main); Find the last edit text EText1 = (edit text) VVBID (RED Edit Text 1); Find the last edit text EText2 = (EditText) ViewById (R.id.editText2); Find the last button BTN1 = (button) VibibIID (R.B. button 1); . Btn1.setOnClickListener (New View.OnClickListener) {Public Zero onClick (see v) {String str = eText1.getText () toString (); String Log = "Malaica"; if (str == log) {intent = New intent (getApplicationContext (), FirstButton.class); intent.putExtra ("welcome", log in); else {toast TOS = Toast.makeText (getApplication (), "wrong", toast.LENGTH_SHORT); tos .show ();}}}); ...

sql - how to use truncate in CTE -

with tranecttect (Empid, name) as (truncatetest * choose from where Empid = 10) table truncatecte Truncate but this is showing an error: Wrong syntax near the keyword 'trunk' Please help me solve it ... Actually, TRUNCATE is a DDL operation, which means that all of the rows You can not delete the Some rows And leave the other rows in the table. And, the with section can be processed as inline view or a temporary table, therefore, there is no point in touching it. So, your query does not understand at all. If you want to remove some rows from a table, delete what it means, but because you have mixed subquery factory and small, the full question is invalid .

Xades4j and Base64 in EnvelopedXmlObject -

I tried putting the base 64 string in the object in EnvelopedXmlObject: DocumentBuilderFactory dbFactory = DocumentBuilderFactory newInstance (); DbFactory.setNamespaceAware (true); DocumentBuilder debugger = DBFTC NE DocumentBuilder (); Document document = dBuilder.newDocument (); String generated document = ...; BASE64Encoder encoder = new BASE64Encoder (); String generated document encoded = encoder.node (generated document .getBytes ("UTF-8")); Node node 1 = document. CreateTextNode (generated encoding document); Data ObjectDesk Data ObjectDisk = New EnvelopedXmlObject (node ​​1, "plain / text", "http://www.w3.org/2000/09/xmldsig#base64"); .... When I run this code in file.xml, then each row object "& amp; # 13; which produces an error with the decoding text When I add this line: node node 1 = document. CreateTextNode (encoded generated document); saveFile ("c: \ temp \\ Temp.xml" , Generated document encoded); String ...

php - How to get a wordpress post custom filed value and assign it to a variable? -

Image
I am creating a form that sends the details of the form to my email. My custom field is: My Function Php function getHotel_contact_number () {global $ wp_query; $ Postid = $ wp_query- & gt; Post- & gt; Id; $ GetHotel_contact_number = get_post_meta ($ postid, 'hotel_contact_number', true); $ GetHotel_contact_number; } and my form is: & lt; PHP $ errors = array (); If (isset ($ _ POST ["submit"])) {$ to = "myemail@email.com"; $ Theme = "this is my subject"; $ Hotels = meet (); $ Hotel_contact_nmbr = getHotel_contact_number (); Check out the $ header = array ('sender email'). '' & Gt; ';' // and make sure it is not a blank / empty string. If (empty ($ sender)) {// string down empty, Error Errors $ Error Adding $ Errors ['Sender User'] = "Please Enter Your Name!" If (empty ($ Sender Email)) {// empty string, error errors $ add errors $ errors ['Sender e-mail'] = ...

javascript - Change defaultPageTransition in jquery mobile 1.4.1? -

Is I want to know how to change jquery mobile slide the default page changes? I tried $ ("div [data-role = page]"). Bind ( "Pagebeforeshow", function (e, data) {console.log ( "the first page of ++++++++++ ++++++++++++++++ show") ; $ .mobile.silentScroll (0); $ .mobile.changePage.defaults.transition = 'Slide';}); and $ (document) .on ( "mobileinit", function () {// Apply overrides $ here ( "div [data-role = Page] "). Page Container (" Change ", {Infection:" Slide "}}}); But the two do not work Like this: $ (document) .on ( "mobileinit", function () {$ .extend ($ .mobile, {defaultPageTransition: 'slide'});});

java - Creating a text file and making it appear on desktop -

I've used this code to create an empty Tekstfail but it is only stored in the project folder I want to know How do I show the text file on the desktop? public void Nyafail Creator (string filename) {file OB = name of the new file (file + ".txt"); Boolean filecreated = false; Try {filecreated = ob.createNewFile (); } Hold (IOException e) {System.out.println ("error" + e); } If (filecreated = true) {System.out.println ("create an empty file" + ob.getPath ()); } Else {System.out.println ("Failed to create empty file" + ob.getPath ()); }} If you provide it to the directory path to the desktop, but also on the Depending on the system. For example, on my Linux machine, I ~ / Desktop can I when you do this, the / Do not forget to use // to avoid

terminal - How to keep column headers when using grep? -

Output of some programs starts with the names of columns (e.g., ps a ): $ ps a PID TTY STAT time COMMAND 1306 TTY1 SS + 0:00 / sbin / mingetty / dev / TTY1 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100 -Nav 14,696 points / ss0: 00 -bash 15283 points / r + 00:00 ps a Now assume that I have frequencies of agetty Want to find: $ ps a | | Grep agetty 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100- nav 15,339 points / s + 00:00 grapes agetty I have seen the beginning of ps Unless the output of a , I do not know what is the output of ps? Grep agetty means . I can print the first line after the matching lines: $ ps a | Head-N1; Ps a | Grep agetty pid TTY STAT time COMMAND 1318 hvc0 ss + 0:00 / sbin / agetty hvc0 38400 vt100- nav 15542 points / 0s + 00:00 grep agetty However, This does not solve my problem when I do not know how many header lines are there lines to get a header there and the method did not match the lines, or some less workaround is to...

arrays - sorting 3D matrix by using 2D matrix -

Hello, I'm trying to sort a 3D coordinate matrix (3 columns and unlimited rows) using sorting in a 2D coordinate matrix. (2 columns and unlimited rows): a = [x1 y1 z1; X2 y2 z2; Xn yn zn]; B = [xn yn; X1 y1; X2 y2]; Example: A = [87 45 47; 87 66 47; 80 40 48; 81 41 48; 87 45 48; 87 66 48; 69 39 4 9; 73 39 49; 79 40 49; 81 71 49; 86 67 49; 70 39 50; 74 38 50; 79 40 50; 82 70 50; 85 68 50; 71 39 51; 75 38 51; B = [87 45; 87 45; 81 41; 80 40; 79 40; 79 40; 75 38; 74 38; 73 39; 71 39; 70 39; 69 39; 87 66; 87 66; 86 67; 85 68; 82 70; 81 71]; I would like to sort based on B, which means that I would like to always like A: Anui = [xn yn zn; X1 y1 z1; X2 y2 z2] ; This is an example of my data. Axyz is a matrix of coordinates and B is only xy. Is there any way to do this or can someone try to help me? Edit: I used the method proposed by January and its workings. Thanks and sorry if I have not provided enough information in my initial post. If I understand it co...

Getting number of rows/columns from csv file in R with condition -

I have a CCV file, with which I have read with the command: my_data & Lt; There are several columns in it, but I want to get the number of rows, the specific column columns, for example, the number of rows where the column " Value "is 20 more. I've tried: k & lt; -subset (my_data, my_data $ VAL & gt; 24) length (k) but it does not look right. I do not know how it works. dim (k) If you have a data frame or Subset (my_data, my_data $ VAL> 24))

javascript - Collapse Expand in jquery -

Image
I am trying to expand and collapse content in jquery. But the toggle reverses the reaction. When I am expanding, it is showing content from bottom to bottom and when I fall, it is showing content from top to bottom and also, when it is expanding, I want the image to be content To come right. And when I fall, it must collapse and set it on top. ago: I need it: Here's what I tried. ons.bootstrap (); $ (Document) .ready (function () {$ ("header"). Click (function () {$ ("content"). Slide toggle ();});}); & lt; Link href = "http://components.onsen.io/onsen-css-components-default.css" rel = "stylesheet" /> & Lt; Link href = "http://components.onsen.io/patterns/lib/onsen/css/onsenui.css" rel = "stylesheet" /> & Lt; Script src = "http://components.onsen.io/patterns/lib/onsen/js/angular/angular.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://comp...

Accessing element of an array with iterator instead of position in Swift -

I would like to know that Swift has an iterator for the switcher, such as in CPP, which is the position Use Actually, I use position + 1 in my array to access my next element: zero) {var Str = string () var myFunc: (int -> zero)! MyFunc = {If $ 0 & lt; Array.count {str + = array [$ 0] myFunc ($ 0 + 1)} and {success (str)} myFunc (0)} arrayToString ({println ($ 0)}) I find a useful solution like this: var array = ["a", "b", "c", "d"] func arrayToString (success: string -> Zero) {var str = string () var myFunc: (Iterator -> Zero)! MyFunc = {if $ 0! {{Println ($ 0)}) = {{str + = array [$ 0] myFunc ($ 0.next)} other {success (str)} myFunc (array.first)} arrayToString ( Any suggestions? What do you want to use the generator: sir array = ["a" , "B", "c", "d"] var g = array.generate () var str = for string () next (); i! = Nil; i = g.next () ) {Str + = i! } This is very ea...

java - Spring Data Couchbase Unable to load view -

Text after " We are using the spring data couch-based project and when executing an existing view in the output running below error Trying to HTTP status 500 - org.springframework.dao.InvalidDataAccessResourceUsageException: Could not load the design "_design / foo" view "fooCount"; The nested exception is com.couchbase.client.protocol.views.InvalidViewException: The design document "_design / foo" is not able to load the view for our spring data store definition Public interface FooRepository extends CrudRepository & LT; Foo, string & gt; {@View (designDocument = "_design / foo" VIEWNAME = "fooCount") public long fooCount (); } Can someone provide an example of how to execute a query using thoughtful ideas? An example of this tax is decreased I got the answer to this question. 1) The name of the Repository Finder method must be started with "Search" for pre-findFooByName. 2) "fooByNam...

how to cast a variable in xpath python -

आयात करें html आयात अनुरोधों से pagina = 'http://www.beleggen.nl/amx' page = Request.get (पेज) पेड़ = html.fromstring (page.text) aandeel = tree.xpath ('// a [@ title = "इमेटेक"] / पाठ ()' 'प्रिंट aandeel यह हिस्सा काम करता है, लेकिन मैं विभिन्न खिताब के साथ कई लाइनें पढ़ना चाहता हूं, क्या "इमेटेक" भाग को एक चर में बदलना संभव है? ऐसा कुछ, यह स्पष्ट रूप से काम नहीं करता, लेकिन मैं गलत कहां गया? या यह काफी आसान नहीं है? FondsName = "इमेटेक" aandeel = tree.xpath ('// a [@title = "% s"] / पाठ ()')% ( आप लगभग सही थे: Variabelen में var के लिए code> variabelen = [var1, var2, var3]: aandeel = tree.xpath ('// एक [[शीर्षक = "% s"] / पाठ ()'% var)

java - Can't make XPath to work with complex namespaces -

इस तरह से XML के साथ शुरू करें: & lt;? Xml version = " 1.0 "एन्कोडिंग =" यूटीएफ -8 "? & Gt; & Lt; xdp: xdp xmlns: xdp = "http://ns.adobe.com/xdp/" टाइमस्टैम्प = "2009-11-26 टी 15: 21: 36Z" यूयूआईडी = "02334fb6-3ae8-4094-9279-29ff59fc5bc8" & gt ; & Lt; config xmlns = "http://www.xfa.org/schema/xci/2.6/" & gt; ... & lt; / config & gt; & Lt; टेम्पलेट xmlns = "http://www.xfa.org/schema/xfa-template/2.6/" & gt; & Lt; सबफ़ॉर्म नाम = "मूवी" w = "196.85 मिमी" & gt; & Lt; फ़ील्ड नाम = "अवधि" y = "11.7mm" x = "2.175mm" w = "62mm" h = "9mm" & gt; ... & lt; / फ़ील्ड & gt; & Lt; क्षेत्र का नाम = "आईएमडीबी" वाई = "11.7mm" x = "65.675 मिमी" w = "62mm" h = "9mm" & gt; ... & lt; / फ़ील्ड & gt; ... & lt; subform name = "di...

haskell - Parse error on a data type I defined -

I am trying to create a card game in Haskell I defined the following data types P> data rank = R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | J. Q | K | A deriving (affair, Enum, Eq, Ord) data suit = S | H | D | Deriving (Eq, ORD) type deck = [card] C deriving (Gola, Enum, Eq, Ord, Show) data card = Cards (rank :: rank, suit :: suit) > Then I am trying to define constants for a complete deck, such as: fullDeck :: deck full deck = [card (R2, S) ..... ..... For every card in the deck with a lot of cards behind it - when I try to compile it, I get the "Pars error error on input R2" error I R2 rank As part of the data type, and I do not know why it is not working properly You are mixing positional and field notation. Either use: card R2 S or card {rank = r2, suit = s } Expression: card {R2, S} is not valid. is an extension that will allow you to type something similar to writing. Specifically, it allows things like: acard = card...

objective c - How can IOS Photos app can show hundreds of photos in one screen? -

Image
I am working on an application which is showing a lot of photos from multiple sources on the screen. I am wondering how would Apple have seen "photo tile" in his photo app? With such pictures, I my opinion app should memory warning with little pictures (even if I load photos in "thumbnail" size), but I could see that when I zoom it hundreds screen Can show photos out In a way I can imagine that this idea is not personal photos, but they are the single 'tile' images produced from real-time photos, so the app only shows 2-3 photos at a time. . But it still requires CPU power and time so that it can be faster. I can zoom in or out instantly. I want to achieve similar functionality in my app, how to achieve it, it would be great. Thanks for the reply this framework allows you to easily cache images Call thumbnail images with predefined shapes and load items. (Just a "thumbnail" size old Elasat library, you had to change your own siz...

java - FTPSClient raise an exception when trying to login() after logout() -

text>> I want to write code in Java that connects to the server's list using FTP on the SSL protocol and receives some files from it is. Every server has a log in and a list of passwords. In every login I need to connect to the server in something like this: // This is not a real code, this is just what I need to do For the sketch is (server server: server) {server.connect (); (Login password password: server.loginPasswordList) {server.login (login password); Server.getSomeFiles (); Server.logout (); } Server.disconnect (); } I am using FTPSClient from Apache Commons: ftpClient = ftpClient.connect ("host", port); Int reply = ftpClient.getReplyCode (); If (FTPReply.isPositiveCompletion (Answer)) {if (ftpClient.login ("Login", "Password")) {ftpClient.execPBSZ (0); FtpClient.execPROT ("P"); FtpClient.enterLocalPassiveMode (); Println (ftpClient.logout ()); // true} if (ftpClient.login ("another_login", "anothe...

windows - Weird File.open behavior when using different closure types in Ruby -

I started learning chefs to manage my servers and in a very strange (my opinion) behavior in Ruby Stumbled I do not know Ruby, so this can only be a misunderstanding from my part. I was getting 'delete': permission denied - [some path] / metadata.Jason (Errno :: EACCES) Because I knew that it was not really about permissions, the next logical point was that file locking should be checked after a little dig through the relevant code, I came to know that there is a method that Produces a checksum for each file. def checksum_file (file, digest) File.open (file, 'rb') {| F | | Checksum_io (f, digest)} end def checksum_io (IO, digest) while chunk = io.read (1024 × 8) digest. Adate (Chuck) end digest. After being Hexdigest end that I searched for a little and found out about closing the files in Ruby and it appears that the code was actually ok ... but this is not Was there. I tried to convert the method to "Block format" and it ...

parse.com - Send emails from IOS App -

Hello I have to know how to send emails from your iOS app. I am using paras and they have cloud modules to interface for mailguns, cendrids etc. But there is no example code for iOS which I can see. I have created an account with Sendgrid and need to know how to execute it with pars. I have tried to add a cloud code with a pars guide, but I am not getting this right. Does anyone help me push me in the right direction to get this function in this app, a tutorial or a sample code or any advice that I really appreciate it One way to send e-mail is to integrate the mandrel with parse, you will get a parsed cloud function Can use the Mandril API to send email. You have to trigger the cloud function via the OS code. You can even create templates in the Mandrille and fill out the template specific places based on specified input value. Just search on parse tutorials. You can find examples related to cloud function and mandrel. If you have not received any material, please notify ...

ios - Error fetching swift post variables -

I created an HTTP post request in Swift iOS. When I get a post variable in the php file, it looks empty, I can not find the variable value under my swift code, look at it. Data = name = john & type = student "var request: NSMutableURLRequest = NSMutableURLRequest () request.URL = NSURL (string:" http: /www.example.com/ Example.php ") PostString = (DustString as NSString) .DetUsing Encoding (NSUTF8StringEncoding) request.HTTPMethod =" POST "request.setValue (" Application / Jason ", forHTTPHeaderField:" Content-Type ") Request.HTTPBody = postString Var connection = NSURL connection (request: request, delegate: self, initial: wrong) Func connection (didReiveiveResponse: NSURLConnection !, didReiveiveResponse response: NSURLResponse!) {// New request Need to clear the tattoo object println (response)} PHP code: Anyone can suggest what I should do for variable values. Thank you You Content-Type of application / Applic...

Output with println in clojure on Hackerrank -

Hi, I am starting to write the closing code and practice the questions. I need to take the problem 2 RGRG BGYJ is input as input where 2 test case The number occurs after two strings. I have written the following code to produce input and input where fullballs? My task is: (defn start [FuncToCall inputParse outputParse] (two [lines (line-seq in Java.io.bufferedReader. *) * Input (rest lines) Bar (First Rows)] (for [i (Category (Integer Bar)) (Output Purses (Funtools (inputs (NIT input I))))) () Start (integer) is that the characrack says that on standout None gets printed. In addition to this, when I'm trying this int cider repl it is nothing like normal (false false false false) / Code> For two of my test cases .. Is there a problem with for or is my code wrong? is lazy. This means that unless you evaluate the result, side effects will not be performed. It works in your REPL, because of which it tries to print the result of your function. ...

c# - how can I reset or refresh DataGridView Cell back color? -

I have a problem with regard to datagrid view cell re-color. First of all, I am changing the back color of the specific cell of Datagrid View 2. int cnt = datagread view. Rows.Count; For {i.e. i = 0; i & lt; cnt; i ++} {string start = datagroup view 1. Rao [i]. Sel [9]. Value Toasting (); String Start = Convert. Toddime (beginner toastring) Toasting ("DD MMM Yay"); String Finish = Data Grid View 1. Rao [i]. Sel [10]. Value ToString (); String endings = convert toDateTime (ending.ToString ()). ToString ("dd MMM yyyy"); Timespane TS = Convert. Broken time (ending toaster) - convert Tudetime (start tostring ()); Dual diff = ts, pause + 1; Int dif = Convert toInt32 (diff); For (int d = 0; d & lt; dif; d ++) {string str = Convert toDateTime (start.ToString ()). AddDays (D). Ostring ("dd MMM yyyy"); DataGrid View 2. Ro [i] .cell [str]. Style. Back collar = color Olive; }} I have to reset the color according to the new value entered in DataGra...

AMPL: Invalid subscripts -

I intend to do an optimization, but I get an error which is causing the reason I do not find the compiler Complains about SERTIME, is initial and is not invalid. Specifically the compiler halts in TimeConstant complaining that there is no value for servicetime ['Origin']. The problem is in the question: in the time constance}: Amount in the United Nations (i) in the UNI, the termination of the equation [i] * x [i, J, k] & lt; = 1440; Where: original set; Set DESTINATIONS; Set up UNI; Param timed (UNI) integer & gt; 0; Var x {UNI, UNI, H} Binary; Ultimate beginning {UNI}; Ultimate Endimate {UNI}; is a .at file: set Origins: = 1 2 3 4 5 6 7; Set DESTINATIONS: = 8 9 10 11 12 13 14; Uni Set = Origin Union Destination; Ultimate: Initial termination period: = 1 0 1440 360 2 1440 360 3 1440 360 4 1440 360 5 1440 360 6 1440 120 7 1440 120 8 1440 360 9 1440 360 10 1440 360 11 1440 360 12 1440 360 13 0 1440 120 14 0 1440 120; I do not think how it does not...

python - How do I see the SQL that ponyorm generates? -

इस उदाहरण में: db_session के साथ: p = select (_ _ के लिए व्यक्ति में) में डी.नाम == 'जॉन') [:] [0] मुझे डीबगिंग प्रयोजनों के लिए इसकी ज़रूरत है, क्योंकि मैं एसक्यूएल को देखना चाहूंगा कि वह एक समान क्वेरी के लिए अन्य ORMs। एक pony.orm.sql_debug (True) का उपयोग कर सकते हैं। यह आपको सभी एसक्यूएल दिखाएगा जो कि टर्नकी में होती है जब टर्नकी में होती है।

uitableview - In an iOS table view, how should a row be moved to a new section? -

I have a table view with two lines in a row, that is - - Line one line B If I want to enlarge line 1 in a new section, i.e. the end result: --- B - - RA A How should it be obtained? I've already tried: [self.tableView startupdates]; [Self.tableView deleteRowsAtIndexPaths: @ [[NSINX XPath IndexPathForRO: 0Injection: 0]] With ROOAnation: UITWebViewAvisionNonone]; [Self.tableView insertSections: [NSIndexSet IndexSetWithIndex: 1] withRowAnimation: UITableViewRowAnimationNone]; [Self.tableView and Updates]; However, at least in iOS 8, the line is animated out, but then the new volume without any render (i.e. white, no bottom row limit) until some time until no restructuring starts And it comes back. [self.tableView startupdates]; [Self-TaleviewViewLavroATAndApath: [NSINXPath indexPathForRo: 0Injection: 0] to INDICAPPATH: [NSINXXPath indexPathForRO: 0 in size: 1]]; [Self.tableView and Updates]; which increases the exception: Invalid update: Invalid number of s...

c - Give an integer value to a macro through AC_DEFINE -

मेरे एक आवेदन में एक CONNECTION_TIMEOUT स्थिर होता है (जिसका नाम काफी आत्म व्याख्यात्मक है) । इस स्थिर को पूर्वप्रक्रमक मैक्रो ( #define ) के रूप में परिभाषित किया गया है: #ifndef CONNECTION_TIMEOUT # परिभाषित करें CONNECTION_TIMEOUT 3 #endif मैं #ifndef और #endif का उपयोग करने का कारण यहां है क्योंकि मैं चाहता हूं कि इस मैक्रो को समय संकलित करने पर कॉन्फ़िगर करने योग्य हो, जो कि ./ के माध्यम से है कॉन्फ़िगर स्क्रिप्ट इसे अनुमति देने के लिए, मैंने अपने configure.ac फ़ाइल में एक स्विच जोड़ा: AC_ARG_WITH ([timeout], [AS_HELP_STRING ([- के साथ-टाइमआउट] , [...])]) AS_IF (["एक्स $ के साथ-टाइमआउट" = "x"], [AC_DEFINE_UNQUOTED [[CONNECTION_TIMEOUT], ["टाइम-टाइमआउट $"], ["..."] के साथ AS_IF )] यह करने के लिए धन्यवाद, उपयोगकर्ता एक कस्टम टाइमआउट मान के साथ आवेदन संकलन कर सकते हैं: ./ configure --with-timeout = 1 बात यह है, जब मैं ऐसा करता हूं, तो मेरा मैक्रो "1" के बजाय 1 के लिए सेट है इस वजह से, जब मैं इसे हे...

objective c - Wrong height when adding autolayout subview in iOS app -

Image
I am trying to add a subview to an existing view. I am basically adding a subview to copy ActionSheet like this example: This example works fine until I do autollection on custom ActionSheet. When I encounter some problems, I am adding a subview to a red scene, its height in this red scene, and the obstacles to the horizontal and vertical position. My problem is that the height does not seem to be 4S And the right footage on 5S devices becomes taller than 4S to 5S. I expected that it would be the second way because 5S has more than 4Ss I I add the subview with this code: [self. View addSubview: self.customActionSheet.view]; [Self.customActionSheet viewWillAppear: NO]; If I add a view by pressing it instead: [self.navigationController pushViewController: self.customActionSheet Animated: Yes]; Then, as a result, I expected the 4S was completely covered by the red view and in the 5s still there is some area above the red scene. What am I doing wrong here? ...

OAI import - Dspace -

जब मैं कमांड चलाता हूं ./dspace oai import -c मुझे निम्न त्रुटि मिलती है: ओएआई 2.0 प्रबंधक की कार्रवाई शुरू हुई क्लीयरिंग इंडेक्स इंडेक्स को पूर्ण आयात का उपयोग करना org.dspace पर org.dspace.xoai.app.XOAI.index org.dspace.xoai.app.XOAI.index पर (XOAI.java:275) (XOAI.java:229) पर पूर्ण आयात java.lang.NullPointerException। Xoai.app.XOAI.indexAll (org.dspace.xoai.app.XOAI.main) में org.dspace.xoai.app.XOAI.index (XOAI.java:128) पर (XOAI.java: 10) 439) java.lang.reflect पर sun.reflect.NativeMethodAccessorImpl.invoke पर sun.reflect.NativeMethodAccessorImpl.invoke0 (मूल निवासी विधि) (NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43 पर) पर .Method.invoke (Method.java:606) org.dspace.app.launcher.ScriptLauncher.runOneCommand (ScriptLauncher.java:225) org.dspace.app.launcher.ScriptLauncher.main पर (ScriptLauncher.java:77) पर इस संग्रह को सक्रिय करने वाले इस पर कोई आसान तरीका नहीं है; हर बार वस्तुओं काटा जाता है, आप...

php - Setting a timeout for a session after a user has logged in -

I need to close an entrance page if a user has been deactivated for a certain amount of time That's got to be. I think setting up session variables for cookies would be the best way to do this (if there is a better way or my path is wrong, please let me know). The problem is that the session is being deleted and cookies are not set before running the script. Can I move the narration on the bottom of the page? Do I also need a statement? Am I doing this right? thank you in advanced. & lt ?? Php is required ("../ contains / include header.php"); $ End = time () + 90; Setkey ("user", $ _SESSION ["user"], $ end); Setkey ("image", $ _SESSION ["image"], $ end); Setkey ("program", $ _SESSION ["program"], $ termination); Setkey ("email", $ _SESSION ["email"], $ end); Setkey ("role", $ _SESSION ["role"], $ end); If ($ end) {unset ($ _COOKIE ["user"]); Not set (...

OrderBy with enumerable property in AngularJS -

I have an object array where every object can have an array of properties, such as it Name: 'Big House', property: [{name: 'field', value: '400'}, {name: 'year', value: '1 9 50'}}}, {name: 'small (Name: '400'}, {name: 'year', value: '1950'}}}, {name: 'green house', property: [{name: 'Field', '' name ':' '' 'value' ',' '', '{name:' year ', value:' 1 999}}}},]; Now I want to order this list by one of the properties, the area says, using a filter in ng-repeat. Is this possible? I am playing with Plunker () but it does not understand how to do it. Thank you in advance This will also work when this area is the first property : & lt; Tr ng-repeat = "house in house | orderbank: 'attribute [0]. Value' '& gt; Also ensure that the area is defined as integer Now they are wires, so 250 will be sorted bef...

ruby - After performing string.slice() return string with part removed -

I'm sure it is very clear, but I think it is difficult to work. I have a pathname example and I try to remove the first directory of it and then go back to the rest of the string, but the piece removes the part, it seems that little string is no way to get back. Filepth = Ptnmekni ( "This_folder_needs_to_go / Another_folder / Failkhtml") Filedir = Filepthkto_skslais ( "This_folder_needs_to_go /") Newfilepth = Filir hope newfilepath will another_folder / file.html , but instead it just this_folder_needs_to_go / , how will I get to earth on which the part of the string has been removed? Use: "This_folder_needs_to_go / another_folder / file.html ".split ('/', 2) [1] # = & gt; "Other_folder / file.html"

angularjs - how to reset a filter by leaving it empty? -

मेरे पास सूची पर एक फिल्टर है: & lt; input ng-model = " SearchFileName "/ & gt; & LT; तालिका & gt; & Lt; tr ng-repeat = "फ़ोल्डर में फ़ाइल: फ़िल्टर: खोजफाइलनाम" & gt; & Lt; td & gt; & lt; a ng- क्लिक = "ओपनफ़ोल्डर (फ़ाइल.नाव)" & gt; {{file.name}} & lt; / a & gt; & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / तालिका & gt; मैं किसी परिणाम पर क्लिक करते समय खोजफ़ाइलनाम मान को साफ़ करना चाहूंगा। यह ओपनफोल्डर फ़ंक्शन है: $ scope OpenFolder = फ़ंक्शन (नाम) {$ scope.searchFileName = शून्य; $ Http.jsonp ($ scope.server + '? Open =' + encodeurIC घटक ($ scope.buildTreePath ()) '& amp; कॉलबैक = JSON_CALLBACK')। सफलता (फ़ंक्शन (डेटा) {$ scope.folders = डेटा;} ); }} मैं अपना फिल्टर फ़ील्ड खाली नहीं कर सकता, यह काम नहीं करता ... मैं कहाँ गलत हूं? बस का उपयोग करें: $ scope.openFolder = फ़ंक्शन (नाम) {$ scope.searchFileName = null; } var ऐप = कोणीय। म...

Can i periodically write all POST requests (within that time frame) in file in Jmeter? -

My web service loaded with jmeter is loading up to 2000 events per second I log in all my requests Is there a way where I can write my requests from time to time? In fact, I want to write an outgoing request in CSV format every 15 minutes? Is this possible? I am new to jmeter so that the detailed answer will help a lot thanks User.properties file (your JMeter resides under the / bin folder), you can configure the request details by adding the next few rows jmeter. Save.saveservice.output_format = xml jmeter.save.saveservice.url = true jmeter.save.saveservice.samplerData = true So if you run Jmeter on all requests in .jtl result file and For more information about the various JMTor properties and how to set / override, see For reference, there are other properties that are used to define It can be done to determine which values ​​can be stored in the result file: jmeter.save.saveservice.output_format = csv jmeter.save.saveservice.assertion_results_failure_messa...

Highcharts Stacked Bar: How to remove spacing between bars -

I am working with the highlights of the strike bar and want to take some space between the bars so that I can read some I am rendering I can make the place. I have tried Point Padding and Group Padding but they are not working. I tried Min Padding / Max Padding on XXIS and did not do anything. It seems that the only way to get rid of that place is to change the width of the whole chart which I actually do not $ ("# Profit-chart"). High Chart ({lung: {Thousands Sep: {Text: ""}, xAxis: "", ","}, chart: {type: "column", style: {fontFamily: "open suns, without-serif"}} , Legend: {Enabled: False}, Title: {// Minpading: 20, do not work here // Maximum Padding: 1, is not working in either categories here: ["Other business", "Business Benefits Some type "], label: {style: {color:" # 333333 ", font size:" 15px "}}, yAxis: {gridLineDashStyle:" longdash ", title: {text:"...

Generating a random number between two values from an array in Python -

Assume that I have a single column float array of non-integer values: data = [1.1; 1.2; 1.3; 1.4; 1.5] I want to generate random numbers between the two sequential values ​​in this array and want to store those values ​​in a new array. The first value in the new array of ie will be a random number between 1.1 and 1.2, which will be random random numbers 1.2 and 1.3 and so on. I want to get a new array such as data_rand = [1.15; 1.24; 1.37; 1.46] Based on the basic data array. My question is (how will I / what is the best way) in an array, through all the values, again and again, produces a non-integer random number between each pair of pairs after the numbers in the array, By saving these random numbers in a new array? Can this small 5-value data provide an example based on the array? Or tell me in the right direction for each step of the process. import random rand_data = map (random. [Figures: - 1], data [1 : and b > You can map this function to two slides in...

sql server - Which operating systems, and how, can pin pages in a database buffer pool? -

अधिकांश रिलेशनल डेटाबेस निर्माण पाठ्यपुस्तकों को एक पृष्ठ पिन करने में सक्षम होने की अवधारणा के बारे में बात करते हैं, यानी ऑपरेटिंग सिस्टम को इसे गमागमन से रोकना स्मृति का अवधारणा यह है कि डेटाबेस सॉफ्टवेयर इसका स्वयं का बफर प्रतिस्थापन एल्गोरिथ्म का उपयोग कर सकता है, जो कि ओएस वर्चुअल मेमोरी पॉलिसी के मुकाबले किसी भी बेहतर फिट हो सकता है। यह स्पष्ट नहीं है कि सामान्य डेस्कटॉप ऑपरेटिंग सिस्टम वास्तव में प्रदान करते हैं पृष्ठों को पिन करने की क्षमता के साथ प्रोग्रामर उदाहरण के लिए, ओएस एक्स पर सबसे अच्छा मैं ढूंढ सकता हूं, वायर्ड पेजों को संदर्भित करता है, लेकिन ये सुपरयुजर द्वारा केवल प्रयोग करने योग्य लगते हैं। क्या पेजों को लगाए जाने की अवधारणा है, और उचित बफर प्रतिस्थापन रणनीतियों को परिभाषित करना केवल सैद्धांतिक ब्याज की ओएस का स्थान ले लेते हैं, और असली रिलेशनल डेटाबेस सिस्टम द्वारा वास्तव में लागू नहीं होते हैं? या ऐसा मामला है कि विशिष्ट डेस्कटॉप ओएस (लिनक्स, विंडोज, ओएस एक्स) में पिनिंग के लिए हुक शामिल हैं, और विशिष्ट रिलेशनल डीबी सॉफ्टवेयर (ओरेकल, एसक्यूएल सर्वर, पोस...

c - nvcc with avx support cannot find gcc builtin intrinsics -

This is my first question; -) I try to use in the CUDA application (ccminer) but NVCX shows an error: / usr / local / cuda / bin / nvcc - Xcompiler "-Wall -mavx" -O3-I -Xptxas "-abi = no -v" -gencode = arch = compute_50, code = \ "sm_50, compute_50 \" --maxrregcount = 80 --ptxas-options = -v -I./compat/jansson -o x11 / X11.oc x11 / x11.cu /usr/lib/gcc/x86_64-linux-gnu/4.8/include/avxintrin.h(118): Error: identifier "__builtin_ia32_addpd256" undefined [...] This is just the first error, many 'undefined' Biltton functions are: - ( 'C / C Everything is fine for the program ++ -. With or without CPP extension .cu - error :-( what do i do? I can compile ccminer, but i can not add avc intrinsics in .cu files - only .c files I use Intel intrinsics GCC Thanks in advance. Linux Mint (Ubuntu 13) 64 bit, GCC 4.8.1, Kuda 6.5. I do not expect APX to work on the GPU. The shortest part of the CU file is CPU based code which I w...

javascript - How to combine object array values into 1 array? -

I have a data object that has an object containing an tags array, through a loop Would like to capture the object and each object tag and finally add the coalition, adds the value to 1 array, which is called selections when the loop is completed. At the moment I am unable to solve it, I have tried to push the tag into an array, then use the underscore_uayan method, and also that every loop attempts to include the array in 1 but with success No. Can anyone suggest solutions? Object: JS var selection = []; Var data = ([[role: "developer", tag: "developer", tag: ["javascript", "css", "html"]}, {roll: "creator", tag: "creator", tag: ["Project Management", "Pitching", "Billing"]}]]); For (var i = 0, len = data.length; i & lt; len; i ++) {selection.concat (data [i] .tags); } Console.log (Selection); You need to reassign selection And to concat that again Then use: ...

asp.net mvc - MVC4 render item that uses variable? -

I'm new to MVC, I have in my view: @ { MyObjectType myNameObject = getMyNameObject (); } & Lt; P & gt; Name: @ myNameObject.firstName & lt; / P & gt; Desing is trying to implement when the line comes from "name: @ myNameObject.firstName" module or ViewBag and still raises the value of @myNameObject.firstName Is it possible? Thank you Your controller action method should get the data and pass it in the view. Using a view model is usually a way to go, but for a one-off data, the workspace also works like this: // View the model public class MyViewModel {public string name {Get; Set;}} // Controller Mode Public Function MyPage () {MyViewModel Model = serviceLayer.GetMyData (); See Return (Model); } // MyPage View @modelmiviammed & lt; P & gt; Name: @model Name & lt; / P & gt;

sql - converting a column to be empty -

I have two tables in which the date of a table is the date and not the other, I have entries from both the table of the main union To bring So now I have been successful, but the empty area is showing an invalid date like 1901-01-01, I want it to be canceled in an empty form, Like an artist in varchar I'm trying it like this Throwing the above error And by doing so it will affect performance before "

c - How do you use optional and non optional arguments? -

I getopt to accept command-line arguments such as ./ How do i use What I am trying to do just now, the command line accepts logic, where there are some alternatives and nothing is there. For example: ./program argv [1] argv [2] -a yes - not After several alternative arguments, the option is probably a bad idea; If you can help it, do not design the command line syntax. He said, you can parse getopt outside of your code, unless you see anything like an option ( argv Increasing and decreasing argc ). Then use getopt for the remaining command line from that point. Pseudo Code: For (; * argv; argc -, argv ++) {if (argv looks like an option) break; Process * argv somehow) process now with getopt (argc, argv, ...)

c++ - Cast std::endl to a function pointer -

यह एक अनुवर्ती सवाल है निम्न समाधान प्रस्तावित: समारोह (static_cast & LT; std :: ostream & amp; (& amp;) (std :: ostream & amp;) & gt; (std :: endl)); मुझे यह भी पता चला है कि निम्न कोड मेरे लिए भी काम करता है: फ़ंक्शन (स्टेटिक_कास्ट & lt; std :: ostream & amp; (*) (std :: ostream & amp; ;) & gt; (std :: endl)); प्रश्न & gt; कौन सा पसंदीदा तरीका है? मैं ऐसा करूँगा: टेम्पलेट & lt; वर्ग सिग & gt; संरचना संदर्भ_तथा_फंक्शन {}; टेम्पलेट & lt; वर्ग आर, कक्षा ... Args & gt; Struct संदर्भ_ कार्य_कार्यक्रम & lt; आर (आरजीएस ...) & gt; {टाइप करके = आर (& amp;) (एआरजी ...); }; टेम्पलेट & lt; वर्ग सिग & gt; Sig_t = typename reference_to_function & lt; Sig & gt; :: टाइप करें; टेम्पलेट & lt; वर्ग सिग & gt; sig_t & LT; सिग & gt; Pick_signature (sig_t & lt; Sig & gt; च) {वापसी च; } फिर: फ़ंक्शन (पिक_सैग्नेचर & lt; std :: ostream & amp; (std :: ostream ...

c# - Copy all contents of a directory and change names of the existing contents -

There is a start here I am trying to copy all the contents from one folder to another, suppose the initial folder is called inputDir , and the file I copy is called outputDir thing is, some files already in outputdir , And all of them have been named like files in inputDir . This looks like this: - inputDir * hit0.png * hit100.png * hit300.png - outputDir * hit0.png * hit100.png * hit300.png What I am trying to do is to designate all the files inside outputDir so that all the characters are 'bak' at the end of their 'name' And then copy all the files from inputDir to outputDir before their extension. In short, I want to look it like this: - inputDir * hit0.png * hit100.png * hit300.png - outputDir * hit0.png * hit0bak.png * hit100.png * Hit00bak.png * hit300.png * hit300bak.png So far, I've tried to do this separately for each file, and it works fine; However, to write a lot of code, 20 more files are monotonous, so I'd love to know t...

How to set style to a progressBar programmatically on Android -

I have style by moving progress in style.xml when I prepare the layout, then put Progressbar there and set the style Done: style = "@ style / progressbar style" Set the layout to the dialog and it's okay. In order to make progress for communicating in other ways programmatically, I have the next code for progress: New Progress Beta (Reference, Blank, R. Style progress bar style); But there is nothing like this instead of propsbar. Do not forget the progressbar to see the PS that I set as a visual dialog. You can set your style, for example, from Constructor: progressBar = new progressbar (activity, empty, android.r.tprogrambarsistel); Where the third feature is the style. In your case, I think the error is incorrect to choose just this.

angularjs - Bootstrap modal dialog and Angular binding not working -

I'm just trying to set up a warning dialogue, and I'm trying to model the bootstrap for beginners. Bootstrap model: Model fire but it does not show my modalTitle and modalBody value! HTML snippet here (note vm.modalTitle and vm.modalBody scope vars) - and my control code: vm.modalTitle = ''; My controller vm.modalBody = 'Vars launched on top of'; ... function sendRequest () {if (data.status == 'FAIL') {if (data.messages.length & gt; 0) {log error ("Error submitting aggregation request:" + data. [ 0]); Vm.modalTitle = "Error submitting aggregation query!"; Vm.modalBody = Data. Message [0]; $ ('# MyModal') Model ('Toggle') $ ('# MyModal') ('Hide.bs.modal', function (e) {// removed when model is hidden from user}) Return; }}} Modal fire but it does not show my modalTitle and modalBody value! I tried this route when I first learned kangaroo and very quickly they were disappo...

system verilog - Modport trouble using complex struct -

From my previous question (), after creating Typeface Stracts, I try to create an interface with 5 different channel signal declarations Of Structs). The form of structure is: typedef struct {struct {logic [1: 0] A; Logic [2: 0] b; } In; Structure {logic [4: 0] d; } outside; } Axi_X_ch; Then I tried the following code: interface axi_interface (); // as = axi slave axi_x_ch as_X; Axi_Y_ch as_Y; // Axi_X_ch Modort slave similar to structure (input as_X.in, as_Y.in, output as_X.out, as_Y.out); Endinthes but I get the error message (ignore coordinates): Modort slave (input as_X.in, as_Y .in, output as_X.out, as_y.out); | Ncvlog: * E, ILLHIN (Demo SV, 177 | 30): Invalid location for a hierarchical name (as_X). Modod Slaves (Input as_X.in, as_y.in, Output as_X.out, as_Y.out); | Ncvlog: * E, ILLHIN (Demo SV, 177 | 30): Invalid location for a hierarchical name (as_y). ... (for the next two output announcements) ... What am I doing? There should be variables insi...

Connecting Java Application to Ruby on Rails SQLite3 Database -

I am currently working on an electronic gradebook which allows the user to store students and grades in the Java desktop application, among other things. I want to be able to send that information to the Ruby on Ruby SQLite3 database through a stream on the Internet. The purpose of this is that students can use the Ruby report related to their grades on Rail application. Ia ???? I am hoping to make the connection as simple as possible in both Java and Rail applications are mostly complete (although the Rail SQLite3 database is required to be normalized). The problem is that I do not have the experience of connecting applications and I'm not getting any information specifically to connect to a Java desktop application on Ruby on the Railway SQLite3 database. If I can get an example or book that works specifically with him, then it will be something to do the work. So far, my understanding, which is very common for me to do anything, is that I might have another API And should use JS...

mysqli - why is this php variable undefined -

Can anyone tell me why this does not work. class class1 {Private $ database; Function class1 () {$ database = $ this- & gt; Connect (); } Private Function Connect () {$ database = mysqli_connect ("localhost", "user name", "", "db"); If (mysqli_connect_errno ()) {echo "failed to connect to MySQL:". Mysqli_connect_error (); } $ Returned the database; } Private function usedb () {$ query = "Some SQL"; Mysqli_query ($ database, query $); }} I hope this simple example can clearly demonstrate my problem adequately. Anyway, when I run something like this, I see an error that tells me that the "ezardb ()" function references an undefined variable "database". As if out of the scope of the variable ... can anyone give me a solution? This is because in class1 () you can add another local variable $ databases : $ database = $ this- & gt; Connect (); To set and access the $ database prope...

javascript - Sliding photos inside footer wordpress -

I have around 30 different logos and I have to put them all in the footer, from which the footer of this page Slide in the article. , Where the background is slowly sliding through. How can I do this? You can use this code with jQuery: HTML: & lt; Div id = "silde" & gt; & Lt; / Div & gt; CSS: #sild {height: 191 pixels; Width: 100%; Background image: URL (http://laravel.com/assets/img/quotes.jpg); Background-position: 0; } js: $ (document) .ready (function () {var posi = 0; setInterval (function () {posi ++; $ ("#silde"). CSS ("background-position", posi + 'px 0');}, 200);}); and you can use posi ++ to move right, to go to the left posi - and you can Here's a sample:

system verilog - I am trying to code a 8-bit,4x1 multiplexer and I have seen some where that I can use a parameter to do so. Is there any other way to do it? -

I'm trying an 8-bit, 4x1 multiplexer code and I have seen somewhere that I'm going to do this I can use the parameters. Is there any other way to do this? module multiplier (a, b, c, d, select, y); Parameter size = 8; Input [7: 0] A, B, C, D; // Input Input [1: 0] Select; // 2-bit selection output [7: 0] y; // Select the output reg [7: 0]; Always @ (A or B or C or D or Selection) Case (Selection) // Select Case 0: y = a; 1: y = b; 2: y = c; 3: y = D; Default: y = 'bx; Endmodule Since you have tagged it as SystemWirrol: module multiplier # (parameter size = 8) (input [size -1: 0] select A, B, C, D, input [1: 0], output logic [size -1: 0] Y); Always_comb case (select) // Select the case 0: y = a; 1: y = b; 2: y = c; 3: y = D; Default: y = 'x; Endmodule

How to remove attribute from object (Rails & Ajax) -

I am sending an application using the following hash: container = {"Client" = & gt; Customer, "Status" = & gt; "Success"} render: json = & gt; Container.to_jason customer is an object with a token and password. I can not convert javascript, it asks that response in this size: $ Ajax ({{...}}, success: function (data) {if (data.status == "success") {... & lt I am trying to use data: container = {"client" => client.to_json (= only: & gt; [: id :: first_name, last_name, address, phone:]), "status" = & gt; "Success"} render: json = & gt; container.to_json but such another .to_json handles as the first string and wrap it between quotes . Can anyone have any idea to help me? Very much blessed Ad. Have you tried to use the piece ? container = {"client" => gt; client.slice: id, first_name, last_name, address:, phone}

java - How to use AbstractList -

I'm new to Java, just started it a while ago. I am trying to create chat messenger (client-server) and I need a data structure in which I can store an online user (a socket and a string that contains the username). Now I did a lot of research and thought that the AbstraList can help me, but I have to face a problem public class collection & lt; E & gt; Abstracts & lt; E & gt; {Private integer size; Private e [] list; Public collection () {size = 0; List = new E [50]; } @ Override public e-mail (int index) {return list [index]; } @ Override Public Boolean Aid (E element) {return false; } @ Override Public Int size () {return list.length; } Public static zero main (string [] args) {Collection This is my code and clearly I could not find a way around the add function ... I list = new E Tried to use [50]; But this gives a normal initialization error. In short, I do not know how to initialize the inventory object. Now I have three questions: Is the ser...