unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Is it possible to have java inside class call a method from parent class which created it? === This might seem like a stupid question, but is it possible for an object to call a method from the object which instantiated it? Specifcally if I have a class A which extends JFrame to provide a GUI and class B and C which are JPanel with various components, which class A object changes between B and C to display different content to the user.. Is it possible for object of class B to call method of class A without creating another object of class A inside B but call the upper A object which has B inside it?? If that makes sense... If anyone can point me in the right direction it'd be helpful, thanks.
0
[ 2, 25, 32, 938, 20, 57, 8247, 572, 718, 645, 21, 2109, 37, 4766, 718, 56, 679, 32, 60, 800, 3726, 3726, 48, 530, 2260, 101, 21, 3553, 1301, 15, 47, 25, 32, 938, 26, 40, 3095, 20, 645, 21, 2109, 37, 14, 3095, 56, 6322, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Make button be less visible but not gone === A couple of weeks ago I think I read something about makeing a Button or any other View group a bit faded or less visible to show that it is not in use, but can be used if the user does something. Now I can not find it anywhere, and I really want to use it. Does anyone know what it is and if it is useable in android 2.1?
0
[ 2, 233, 5167, 44, 787, 4560, 47, 52, 1042, 800, 3726, 3726, 21, 1335, 16, 1342, 1464, 31, 277, 31, 1302, 301, 88, 233, 68, 21, 5167, 54, 186, 89, 1418, 214, 21, 1142, 8056, 54, 787, 4560, 20, 298, 30, 32, 25, 52, 19, 275, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to read specific number of characters from c-string ? === With `int snprintf(char *str, size_t size, const char *format, ...);` I can write specific number of characters into `str` . How can I read specific number how characters from a c-string ? Regards
0
[ 2, 184, 20, 1302, 1903, 234, 16, 1766, 37, 272, 8, 11130, 13, 60, 800, 3726, 3726, 29, 13, 1, 6391, 8912, 10299, 410, 5, 5433, 1637, 9729, 15, 1072, 1, 38, 1072, 15, 11608, 38, 4892, 1637, 23588, 15, 13, 9, 9, 9, 6, 73, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
asmack incomingfiletransfer: transfer.isDone() gets never triggered, but file gets transmitted successfully === I have a problem with my xmpp app on android. I'm able to connect successfully to my server and send messages, but I have a problem with the filetransfer from the server to the mobile phone. ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(xmpp); if (sdm == null) { sdm = new ServiceDiscoveryManager(xmpp); } sdm.addFeature("http://jabber.org/protocol/disco#info"); sdm.addFeature("jabber:iq:privacy"); FileTransferNegotiator.IBB_ONLY = true; ftManager = new FileTransferManager(xmpp); ftManager.addFileTransferListener(new FileTransferListener() { @Override public void fileTransferRequest(FileTransferRequest request) { IncomingFileTransfer transfer = request.accept(); try { String filepath = "/sdcard/abc"; File f = new File(filepath + request.getFileName()); double percents = 0.0; int currentCycle = 0; transfer.recieveFile(f); //isDone() GETS NEVER TRUE while(!transfer.isDone() && currentCycle < 100) { if(transfer.getStatus().equals(Status.in_progress)) { percents = ((int) (transfer.getProgress()*10000)) / 100.0; Log.i(LOG, "Filetransfer Progress: "+percents + " Status: "+transfer.getStatus().toString()); } else if (transfer.getStatus().equals(Status.error)) { Log.e(LOG, "FileTransfer ERROR"+transfer.getError().getMessage()); break; } currentCycle ++; Thread.sleep(1000); } if(transfer.getStatus().equals(Status.complete)) { handlefile(); }else{ Log.e(LOG, "Filetransfer not complete. Status:" + transfer.getStatus().toString()); //FILE IS HERE if(f.exists()) { f.delete(); } } } catch (XMPPException e) { Log.e(LOG, e.getMessage()); transfer.cancel(); } catch (Exception ex) { Log.e(LOG, ex.getMessage()); transfer.cancel(); } } }); In the loop, transfer.isDone() gets never called true and the Status gets never completed, but when I have a look at the sdcard, I can see the file in the correct size, so it was successfully transmitted. Whats wrong here?
0
[ 2, 28, 15571, 17126, 16877, 7028, 2407, 45, 2617, 9, 403, 43, 849, 5, 6, 3049, 243, 15164, 15, 47, 3893, 3049, 13377, 3673, 800, 3726, 3726, 31, 57, 21, 1448, 29, 51, 993, 79, 3421, 4865, 27, 13005, 9, 31, 22, 79, 777, 20, 637...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
align decimals in array of currency values === I've tried to write a function that will take an array of different amounts and align the decimal places, by adding the appropriate amount of `&nbsp;` to each number with a lesser length than the number with longest length. It seems pretty long though, and I wonder if anyone has some insight on how I could make is shorter and more efficient. $arr = array(12, 34.233, .23, 44, 24334, 234); function align_decimal ($arr) { $long = 0; $len = 0; foreach ( $arr as &$i ){ //change array elements to string (string)$i; //if there is no decimal, add '.00' //if there is a decimal, add '00' //ensures that there are always at least two zeros after the decimal if ( strrpos( $i, "." ) === false ) { $i .= ".00"; } else { $i .= "00"; } //find the decimal $dec = strrpos( $i, "." ); //ensure there are only two decimals //$dec+3 is the decimal plus two characters $i = substr_replace($i, "", $dec+3); //if $i is longer than $long, set $long to $i if ( strlen($i) >= strlen($long) ) { $long = $i; } } //locate the decimal in the longest string $long_dec = strrpos( $long, "." ); foreach ( $arr as &$i ) { //difference between $i and $long position of the decimal $z = ( $long_dec - strrpos( $i, "." ) ); $c = 0; while ( $c <= $z ) { //add a &nbsp; for each number of characters //between the two decimal locations $i = "&nbsp;" . $i; $c++; } } return $arr; } it works okkaaay... just seems really verbose. I'm sure there are a million ways to make it much shorter and more professional. Thanks for any ideas!
0
[ 2, 23389, 26380, 18, 19, 7718, 16, 10507, 4070, 800, 3726, 3726, 31, 22, 195, 794, 20, 2757, 21, 1990, 30, 129, 247, 40, 7718, 16, 421, 8545, 17, 23389, 14, 26380, 1489, 15, 34, 4721, 14, 4593, 2006, 16, 13, 1, 1569, 13502, 3401...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Json Success Not Triggering On Valid Json === I am attempting to send a json message from a custom application to a web page. The json message is being returned, and appears to be valid, but it is not causing the success function to trigger. I am currently using jquery-1.4.4.js, previously I was using jquery-latest.js as hosted on jquery.com. Using that version I received an error of "parseerror", but with 1.4.4 i don't receive a success or failure. My code is as follows: On the web page: <script> $(document).ready(function () { $.ajax({url: "http://localhost:8080/callback=?", dataType: "json", success: function(data) { alert("reply received"); }, error: function(data, error) { alert("error: " + error); } }); }); </script> The json message I am receiving back (as viewed in Chrome's network panel) [{"name":"John"},{"name":"Mike"}] And in my C# application the code is: string response = "[{\"name\":\"John\"},{\"name\":\"Mike\"}]"; request.ContentType = "application/json"; webserver.SendToBrowser(response, request); and .. public void SendToBrowser(string data, Classes.HTTPRequest request) { int numBytes = 0; byte[] bData = Encoding.ASCII.GetBytes(data); try { string header = ""; header += "HTTP/1.1 200 OK\r\n"; header += "Server: MyServer\r\n"; header += "Content-Length: " + bData.Length.ToString() + "\r\n"; header += "Content-Language: en\n\r"; header += "Content-Type: " + request.ContentType + "\r\n"; header += "Connection: close\r\n\r\n"; Byte[] headerBytes = Encoding.ASCII.GetBytes(header); if (request.Socket.Connected) { request.Socket.Send(headerBytes, headerBytes.Length, 0); if ((numBytes = request.Socket.Send(bData, bData.Length, 0)) == -1) Console.WriteLine("Socket Error cannot Send Packet"); else { Console.WriteLine("No. of bytes sent {0}", numBytes); } } else Console.WriteLine("Connection Dropped...."); } catch (Exception e) { Console.WriteLine("Error Occurred : {0} ", e ); } request.Socket.Close(); } Any help much appreciated!
0
[ 2, 487, 528, 1280, 52, 7286, 68, 27, 7394, 487, 528, 800, 3726, 3726, 31, 589, 6314, 20, 2660, 21, 487, 528, 2802, 37, 21, 5816, 3010, 20, 21, 2741, 2478, 9, 14, 487, 528, 2802, 25, 142, 587, 15, 17, 1780, 20, 44, 7394, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Retrieve time zone based on locale country information === Yet another date/time related question ;-) Question -------- Is there an easy way to query your current country via locale info and then look up the corresponding time zone (format `"<country>/<city>"`, e.g. `"Europe/Berlin"` for Germany)? I should add that things are kind of messed up with a "Germany + MS Windows + R" combination, hence the question in the first place: > Sys.timezone() [1] "MST" Warning message: In as.POSIXlt.POSIXct(Sys.time()) : unknown timezone 'MET-1MST' I should also add that I'd like the solution to be independent from internet resources such as stated in this [post/answer][1]. The problem context ------- Suppose you **don't** know how to specify your time zone yet. You might have heard something about **CET/CEST** etc, but that doesn't really get you anywhere (at least being located in Germany ;-)). You can get a list of available `"<country>/<city>"` pairs from the `/share/zoneinfo/zone.tab` file in your RHOME directory. Yet, in order to find the time zone corresponding to the current country you're in you need to know the ISO country code. Of course we usually do for our native country, but let's suppose we don't (I'd like to end up with a generic approach). What do you do next? Below is my "four-step" solution, but I'm not really happy with it because 1. it relies on yet another contrib package ([ISOcodes][2]) 2. I can't test if it works for other locales as I don't know what the info actually would look like if you're in India, Russia, Australia etc. Anyone got a better idea? Also, It'd be great if some of you in countries other than Germany could run this through and post their locale info `Sys.getlocale()`. Step 1: get locale info --------------- loc <- strsplit(unlist(strsplit(Sys.getlocale(), split=";")), split="=") foo <- function(x) { out <- list(x[2]) names(out) <- x[1] out } loc <- sapply(loc, foo) > loc $LC_COLLATE [1] "German_Germany.1252" $LC_CTYPE [1] "German_Germany.1252" $LC_MONETARY [1] "German_Germany.1252" $LC_NUMERIC [1] "C" $LC_TIME [1] "German_Germany.1252" Step 2: get country name from locale info --------------------------------------- country.this <- unlist(strsplit(loc$LC_TIME, split="_|\\."))[2] > country.this [1] "Germany" Step 3: get ISO country code ---------------- Use `country.this` to look up the associated country code in data set `ISO_3166_1` of package [ISOcodes][3] require("ISOcodes") data("ISO_3166_1") iso <- ISO_3166_1 idx <- which(iso$Name %in% country.this) code <- country.iso[idx, "Alpha_2"] > code [1] "DE" Step 4: get time zone ------------- Use `code` to look up the time zone in the data frame that can be derived from file `RHOME/share/zoneinfo/zone.tab` path <- file.path(Sys.getenv("R_HOME"), "share/zoneinfo/zone.tab") tzones <- read.delim( path, row.names=NULL, header=FALSE, col.names=c("country", "coords", "name", "comments"), as.is=TRUE, fill=TRUE, comment.char = "#" ) > tzones[which(tzones$country == code), "name"] [4] "Europe/Berlin" [1]: http://stackoverflow.com/questions/863672/how-to-get-time-zone-information-from-country [2]: https://www.google.com/url?q=http://cran.r-project.org/package=ISOcodes&sa=U&ei=2qr1T_yFAuTV4QSlrcSMBw&ved=0CAYQFjAA&client=internal-uds-cse&usg=AFQjCNGsWU3s6m1QmYz6hVYPDNEah8YfeA [3]: https://www.google.com/url?q=http://cran.r-project.org/package=ISOcodes&sa=U&ei=2qr1T_yFAuTV4QSlrcSMBw&ved=0CAYQFjAA&client=internal-uds-cse&usg=AFQjCNGsWU3s6m1QmYz6hVYPDNEah8YfeA [4]: https://www.google.com/url?q=http://cran.r-project.org/package=ISOcodes&sa=U&ei=2qr1T_yFAuTV4QSlrcSMBw&ved=0CAYQFjAA&client=internal-uds-cse&usg=AFQjCNGsWU3s6m1QmYz6hVYPDNEah8YfeA
0
[ 2, 11917, 85, 2464, 432, 27, 375, 62, 475, 676, 800, 3726, 3726, 768, 226, 1231, 118, 891, 1597, 1301, 13, 73, 8, 6, 1301, 13, 8, 8, 8, 8, 8, 8, 8, 8, 25, 80, 40, 2010, 161, 20, 25597, 154, 866, 475, 1197, 375, 62, 15404, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way of creating a company portal website using open source web technologies === I want to build a portal website for my company which is a medium size MNC, so just want to know how can do this with any open source web technologies(preferred ones are PHP, MySQL, HTML, CSS & JS). I am fine to go with any open source technologies, let me know if there are already some tools exist to build these kind of portals OR any piad softwares which I can install and configure according to my requirements. FYI: I came across some of the options like Joomla, Drupal, Sharepoint etc. Thanks, Siva
0
[ 2, 246, 161, 16, 2936, 21, 237, 8281, 2271, 568, 368, 1267, 2741, 5740, 800, 3726, 3726, 31, 259, 20, 1895, 21, 8281, 2271, 26, 51, 237, 56, 25, 21, 4152, 1072, 307, 6897, 15, 86, 114, 259, 20, 143, 184, 92, 107, 48, 29, 186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Core Data: sorting before saving === I am adding to a simple entity, a list of names (from an array). But before saving the entity, I would like them to be sorted. Please could someone be so kind as to tell me how to do this? I've seen how to sort some fetched data, but I do not know how to do this. A written example would be greatly appreciated. Many thanks. NSManagedObjectContext *context = [self managedObjectContext]; NSString *myTempString; for (databaseMakerVC *aName in peoplesNames.theArray) { myTempString = [[NSString alloc] initWithFormat:@"%@", aName]; peoplesNamesObject *newObject = [NSEntityDescription insertNewObjectForEntityForName:@"peoplesNamesObject" inManagedObjectContext:context]; newObject.aName = myTempString; } // *** Do the sorting here!? *** // Save the context NSError *error = nil; if (![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); }
0
[ 2, 2884, 1054, 45, 2058, 68, 115, 7599, 800, 3726, 3726, 31, 589, 4721, 20, 21, 1935, 9252, 15, 21, 968, 16, 1817, 13, 5, 2665, 40, 7718, 6, 9, 47, 115, 7599, 14, 9252, 15, 31, 83, 101, 105, 20, 44, 22554, 9, 2247, 110, 737,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
system wide shortcut for Mac OS X === So I was asked to port some internal helper applications to Mac OS X 10.7. Works all quite welll as the platform dependent code is minimal anyhow, but one application needs a system wide shortcut to function (i.e. [RegisterHotkey](http://msdn.microsoft.com/en-us/library/windows/desktop/ms646309%28v=vs.85%29.aspx) functionality) and I can't find any documentation on how I'd do this on a Mac. The program is using a PyQt gui and the corresponding code for windows is basically: def register_hotkey(self): hwnd = int(self.winId()) modifiers, key = self._get_hotkey() user32.RegisterHotKey(hwnd, self._MESSAGE_ID, modifiers, key) and then to receive the hotkey events: def winEvent(self, msg): if msg.message == w32.WM_HOTKEY: self.handle_hotkey() return True, id(msg) return False, id(msg) Note that I don't need a python variant, I can easily write a simple c extension - so C/objective-c solutions are welcome as well.
0
[ 2, 329, 1051, 502, 4118, 26, 1572, 13, 759, 993, 800, 3726, 3726, 86, 31, 23, 411, 20, 1295, 109, 3117, 448, 106, 3767, 20, 1572, 13, 759, 993, 332, 9, 465, 9, 693, 65, 1450, 134, 255, 28, 14, 2452, 9063, 1797, 25, 8663, 186, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pass parameter into HTML file from android === I can show up HTML file content in android webview well.Now how could i pass parameter into HTML file.For ex.my HTML content has an video player i need to pass dynamic values(URL) into HTML file for playing dynamic video.My HTML file is located on asset folder.How could i do this? Thanks.
0
[ 2, 184, 20, 1477, 18906, 77, 13, 15895, 3893, 37, 13005, 800, 3726, 3726, 31, 92, 298, 71, 13, 15895, 3893, 2331, 19, 13005, 2741, 4725, 134, 9, 1387, 184, 110, 31, 1477, 18906, 77, 13, 15895, 3893, 9, 1106, 1396, 9, 915, 13, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pick items from warehouse to minimise travel in TSQL? === I am looking at this problem from a TSQL point of view, however any advice would be appreciated. <b>Scenario</b> I have 2 sets of criteria which identify items in a warehouse to be selected. Query 1 returns 100 items<br> Query 2 returns 100 items I need to pick any 25 of the 100 items returned in query 1.<br> I need to pick any 25 of the 100 items returned in query 2.<br> - The items in query 1/2 will not be the same, ever. Each item is stored in a segment of the warehouse. <br>A segment of the warehouse may contain numerous items. I wish to select the 50 items (25 from each query) in a way as to reduce the number of segments I must visit to select the items. <b>Suggested Approach</b> My initial idea has been to combined the 2 result sets and produce a list of Segment ID, NumberOfItemsRequiredInSegment I would then select 25 items from each query, giving preference to those in a segments with the most NumberOfItemsRequiredInSegment. <br><br>I know this would not be optimal but would be an easy to implement heuristic. <b>Questions</b> 1) I suspect this is a standard combinational problem, but I don't recognise it.. perhaps multiple knapsack, does anyone recognise it? 2) Is there a better (easy-ish to impliment) heuristic or solution - ideally in TSQL? Many thanks.
0
[ 2, 184, 20, 2036, 3755, 37, 8308, 20, 4236, 79, 2628, 1773, 19, 13, 38, 18, 22402, 60, 800, 3726, 3726, 31, 589, 699, 35, 48, 1448, 37, 21, 13, 38, 18, 22402, 454, 16, 1418, 15, 207, 186, 4978, 83, 44, 13746, 9, 13, 1, 220, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does [import java.awt.*] not also include [import java.awt.event.ActionEvent]? === Evening, I was playing around with a little swing application, and I added a button which was to respond to being pressed. Therefore I needed to implement ActionListener. I had already added this line: import java.awt.*; but it informed me that it could not find the "ActionListener" class. So after a few moments I ended up with this: import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; I was under the assumption that the awt.* part meant that it was importing all sub-packages under the awt umbrella. Apparently this isn't the case. Can someone please clarify this problem for me?
0
[ 2, 483, 630, 636, 1660, 1993, 8247, 9, 3885, 38, 9, 2483, 500, 52, 67, 468, 636, 1660, 1993, 8247, 9, 3885, 38, 9, 4943, 38, 9, 8645, 4943, 38, 500, 60, 800, 3726, 3726, 2089, 15, 31, 23, 791, 140, 29, 21, 265, 5587, 3010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customize the labels of X axis [core-plot] === I'm working with core-plot and having problem with the x axis' customization . I want x axis' labels to display some dates but they don't have an equal difference . For example , the dates may be like this : 2012-05-06 , 2012-06-08 , 2012-07-21 ... So I think I can not set the axis labels by setting the major interval . Can anyone tell me the way to do this ? Any suggestion will be appreciated !
0
[ 2, 5816, 2952, 14, 13173, 16, 993, 8577, 636, 10375, 8, 13221, 38, 500, 800, 3726, 3726, 31, 22, 79, 638, 29, 2884, 8, 13221, 38, 17, 452, 1448, 29, 14, 993, 8577, 22, 5816, 1829, 13, 9, 31, 259, 993, 8577, 22, 13173, 20, 3042...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Yammer Oauth2 - REST API - Issues creating Messages === I am having authenticated with the Yammer API as per their documentation and obtained my access_token. I can retrieve data via the REST api ie > GET https://www.yammer.com/api/v1/messages.json?access_token=ACCESS_TOKEN Returns an JSON array of all the messages When I try to POST to create a message ie. > POST https://www.yammer.com/api/v1/messages.json?access_token=ACCESS_TOKEN&body='test' The response returns the same results as the get request and my post is not created. Anyone?
0
[ 2, 2167, 11531, 635, 1346, 96, 135, 13, 8, 760, 21, 2159, 13, 8, 1549, 2936, 7561, 800, 3726, 3726, 31, 589, 452, 14351, 1669, 29, 14, 2167, 11531, 21, 2159, 28, 416, 66, 13945, 17, 3048, 51, 1381, 1, 262, 2853, 9, 31, 92, 119...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
meaning of add esp, -10 in assembly === What does add esp, -10 mean? I thought add in aseembly is used to do addition and sub to do subtraction.. What would happen if add esp, -10 is executed?
0
[ 2, 1813, 16, 3547, 9867, 15, 13, 8, 1036, 19, 1475, 800, 3726, 3726, 98, 630, 3547, 9867, 15, 13, 8, 1036, 884, 60, 31, 289, 3547, 19, 28, 18106, 8818, 25, 147, 20, 107, 848, 17, 972, 20, 107, 27031, 872, 9, 9, 98, 83, 2384,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
multi tags using auto suggest j query plugins === I use Auto suggest jquery plugins from site http://code.drewwilson.com/entry/autosuggest-jquery-plugin for making tags multiplle as like giving in that site but my problem is while selecting from the autosuggest, it was displayed in my input box but i dont want to display selected autosuggest again as like in example given in the link....but i am unable to do such things... please help me... code used by me as follows: <link rel="stylesheet" type="text/css" href="view/stylesheet/autoSuggest.css"> <script type="text/javascript" src="view/javascript/jquery/jquery.autoSuggest.js"></script> <script type="text/javascript"><!-- $("#product_tag1").autoSuggest("http://test.com/ajax", {minChars: 2, matchCase: true,selectedItemProp: "tag", searchObjProps: "tag"}); //--></script> Ajax file like <? $input = $_GET["q"]; $data = array(); $query = mysql_query("SELECT * FROM my_table WHERE my_field LIKE '%$input%'"); while ($row = mysql_fetch_assoc($query)) { $json = array(); $json['tag_id'] = $row['id']; $json['tag'] = $row['tag']; $data[] = $json; } header("Content-type: application/json"); echo json_encode($data); ?>
0
[ 2, 1889, 3383, 18, 568, 3108, 5601, 487, 25597, 10922, 108, 18, 800, 3726, 3726, 31, 275, 3108, 5601, 487, 8190, 93, 10922, 108, 18, 37, 689, 7775, 6903, 9375, 9, 3807, 4460, 11106, 528, 9, 960, 118, 18195, 118, 18042, 18, 21606, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
table.scrollleft is always zero === I have a table with a fixed layout. The columns take up more space than is available so a horizontal scroll bar appears. Currently you can move around in the table using the keyboard arrows. But when a cell is selected that is not in view I need to programmatically tell the scrollbar to move. I thought this would be scrollleft but is not settable and is always zero. Instead I have achieve my desired effect by using scrollIntoView(false). This works but I still want to know why scrollleft was not working.
0
[ 2, 859, 9, 3862, 8694, 9742, 25, 550, 4606, 800, 3726, 3726, 31, 57, 21, 859, 29, 21, 3535, 9106, 9, 14, 7498, 247, 71, 91, 726, 119, 25, 904, 86, 21, 10095, 12159, 748, 1780, 9, 871, 42, 92, 780, 140, 19, 14, 859, 568, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Send data to another C++ program === Is it possible to send data to another C++ program, without being able to modify the other program? If so, how would you do it? My current method involves creating a temporary file and starting the other program with the filename as a parameter. The only problem is that this leaves a bunch of temporary files laying around to clean up later, which is not wanted.
0
[ 2, 2660, 1054, 20, 226, 272, 20512, 625, 800, 3726, 3726, 25, 32, 938, 20, 2660, 1054, 20, 226, 272, 20512, 625, 15, 366, 142, 777, 20, 17579, 14, 89, 625, 60, 100, 86, 15, 184, 83, 42, 107, 32, 60, 51, 866, 2109, 6569, 2936, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LINQ - Proj does not exist in the current === I have the following code: if (pick == null || pick == "active") { var Proj = db.usp_Train(idnbr) .Where(a => a.Inactive == false).ToList(); } else { var Proj = db.usp_Train(idnbr).ToList(); } return PartialView(Proj); For where I have *return PartialView(Projs)* I get a message saying that **Proj does not exist in the current** Any idea on how I can fix this.
0
[ 2, 6294, 1251, 13, 8, 895, 728, 630, 52, 3182, 19, 14, 866, 800, 3726, 3726, 31, 57, 14, 249, 1797, 45, 100, 13, 5, 16855, 800, 3726, 16203, 13, 1, 2036, 800, 3726, 13, 7, 7889, 7, 6, 13, 1, 4033, 895, 728, 800, 13, 9007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to print/log array of string in java? === Little Background: I have `csv` file which has lots of row and each row has string elements, one example of such row would be > 20,11,Clothing,TShirts,Abercombie,Gap Now in my parser, I am parsing this csv file and getting each row present in the file as `String[] data`, now in my log page, I need to have id as well as row present in the file. Current if I try to print then am getting values like `[Ljava.lang.String;@1152e94`, my question is how can i get actual list of array elements like `[20, 11, Clothing, TShirts, Abercombie, Gap]`? Tried using default `toString()` but still it give same `LString` data.
0
[ 2, 184, 20, 4793, 118, 5567, 7718, 16, 3724, 19, 8247, 60, 800, 3726, 3726, 265, 2395, 45, 31, 57, 13, 1, 6824, 710, 1, 3893, 56, 63, 7503, 16, 3131, 17, 206, 3131, 63, 3724, 2065, 15, 53, 823, 16, 145, 3131, 83, 44, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Deleting items from a list as a "trigger" for a while loop === I want to do this: while list: for blah in blah: things list.remove(min(list)) Would this loop until all the items in list are removed? As i have it my code, it just loops through [list] times, and then returns from the function. I need a loop that will keep going until all the items of list are gone. By request, the entire algorithm as it runs: def parsexlsx(address): bits = [] i = 0 while address: min_address = False for row in ws.iter_rows(row_offset=4,column_offset=3): c = row[2] d = row[3] if not d.internal_value: if min_address: #we set it to true, then kept going until blank row break #bits is what you want it to be now bits = [] #reset bits every time we hit a new row continue #this will just skip to next row for bits_cell in row[4:]: if bits_cell.internal_value: bits.append(bits_cell.internal_value) if c.internal_value: if c.internal_value == min(address): min_address = True i += 1 print i address.remove(min(address)) print bits return bits
0
[ 2, 121, 1336, 68, 3755, 37, 21, 968, 28, 21, 13, 7, 3367, 11356, 7, 26, 21, 133, 5293, 800, 3726, 3726, 31, 259, 20, 107, 48, 45, 133, 968, 45, 26, 27220, 19, 27220, 45, 564, 968, 9, 99, 16598, 5, 2160, 5, 5739, 6, 6, 83, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Overriding symfony2 component === Can anyone of you help me with an example of how to override symfony's component. In my case I need to override Session class from Symfony/Component/HttpFoundation/Session.php Thanks!
0
[ 2, 84, 5175, 68, 13, 7261, 10229, 93, 135, 5912, 800, 3726, 3726, 92, 1276, 16, 42, 448, 55, 29, 40, 823, 16, 184, 20, 84, 11891, 13, 7261, 10229, 93, 22, 18, 5912, 9, 19, 51, 610, 31, 376, 20, 84, 11891, 3723, 718, 37, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can a C/C++ application utilise OpenCL? === This might sound a little bit silly, but I haven't found a definitive answer. I've got an application that would largely benefit from the scalability of OpenCL. But how would I go about with the existing code I have, to implement OpenCL? Would I have to use a wrapper? Do I have to port the code over to OpenCL? Thanks
0
[ 2, 92, 21, 272, 118, 150, 20512, 3010, 13, 14255, 2628, 368, 5316, 60, 800, 3726, 3726, 48, 530, 646, 21, 265, 1142, 10752, 15, 47, 31, 2933, 22, 38, 216, 21, 15676, 1623, 9, 31, 22, 195, 330, 40, 3010, 30, 83, 2679, 4234, 37,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GC_BEFORE_OOM freed <1K, 25% free 48653K/64327K, paused 20ms === My app has a few activities and each of them work fine however if I were to navigate through them a few times I always seem to get an Out of Memory error. I am running this on Ice Cream Sandwich Galaxy Nexus. Making the images on the page low resolution does fix the problem but I cannot have all blurry pictures in my application. Does anyone know why OOM is thrown when I have 25% of my memory free?
1
[ 2, 13, 10362, 1, 12750, 1, 111, 2636, 9292, 13, 1, 165, 197, 15, 172, 1933, 551, 13, 26289, 4022, 197, 118, 3470, 24090, 197, 15, 4653, 434, 79, 18, 800, 3726, 3726, 51, 4865, 63, 21, 310, 1648, 17, 206, 16, 105, 170, 1123, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Starting at a specific row without an ID number? === I'm writing a code which looks up a MYSQL table, hits an API and then writes the result to a table. Initially I was using: $select = "SELECT Partner, Merchant, IP FROM " .$old_table. " WHERE ID >= " .$startRow; mysqli_query($db, $select); This worked well, but then I realized all the tables I have may not have sequential ID numbers, or even ID numbers at all. Is there a way to start at a specific row without ID numbers?
0
[ 2, 1422, 35, 21, 1903, 3131, 366, 40, 4924, 234, 60, 800, 3726, 3726, 31, 22, 79, 1174, 21, 1797, 56, 1879, 71, 21, 51, 18, 22402, 859, 15, 3858, 40, 21, 2159, 17, 94, 6215, 14, 829, 20, 21, 859, 9, 1537, 31, 23, 568, 45, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Model-based pose estimation === I would like to estimate the pose of know 3D object by using opencv. I can use solvePnP if the points of the 3D Model and their corresponded points at the image are given. My question is: how I can find the correspondence between the know 3D Model and its projection on the image? Thank you a lot
0
[ 2, 1061, 8, 1281, 10810, 25390, 800, 3726, 3726, 31, 83, 101, 20, 10243, 14, 10810, 16, 143, 203, 43, 3095, 34, 568, 368, 12732, 9, 31, 92, 275, 8402, 306, 8157, 100, 14, 819, 16, 14, 203, 43, 1061, 17, 66, 14217, 69, 819, 35,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java 7 - JPane paintComponent Titlebar overlapping === why do the titlebar overlapps the pixels of JPanel. Here some code: protected void init() { this.setContentPane(new MyPanel()); this.setSize(915, 725); this.setVisible(true); } class MyPanel extends JPanel { @Override public void paintComponent(Graphics _g) { super.paintComponent(_g); Graphics2D g = (Graphics2D)_g; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); Font font = new Font("Monospaced", Font.PLAIN, 14); g.setFont(font); g.setColor(Color.red); for(int x=0; x<60; x++) { for(int y=0; y< 50; y++) { g.drawString("█", x*15, 0); } } } } I have added the JPane to the JFrame and draw some String at y=0... any suggestions? Thanks Den
0
[ 2, 8247, 453, 13, 8, 487, 16660, 5107, 11103, 218, 2291, 581, 1850, 23854, 800, 3726, 3726, 483, 107, 14, 581, 1850, 15406, 1919, 14, 18146, 18, 16, 487, 3206, 532, 9, 235, 109, 1797, 45, 3803, 11364, 19, 242, 5, 6, 13, 1, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Processing single file from multiple processes in python === I have a single big text file in which I want to process each line ( do some operations ) and store them in a database. Since a single simple program is taking too long, I want it to be done via multiple processes or threads. Each thread/process should read the DIFFERENT data(different lines) from that single file and do some operations on their piece of data(lines) and put them in the database so that in the end, I have whole of the data processed and my database is dumped with the data I need. But I am not able to figure it out that how to approach this.
0
[ 2, 5511, 345, 3893, 37, 1886, 5102, 19, 20059, 800, 3726, 3726, 31, 57, 21, 345, 580, 1854, 3893, 19, 56, 31, 259, 20, 953, 206, 293, 13, 5, 107, 109, 1311, 13, 6, 17, 1718, 105, 19, 21, 6018, 9, 179, 21, 345, 1935, 625, 25,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to unselect all checkboxes with Jqeury? === I have multiselect list box, I want to clear all selected items On clear button click. <asp:ListBox id="StatusField" runat="server" SelectionMode="Multiple" Rows="4" /> I tried as follows. $("#StatusField option:selected").removeAttr("selected");
0
[ 2, 184, 20, 367, 18, 16964, 65, 2631, 5309, 160, 29, 487, 1251, 5630, 93, 60, 800, 3726, 3726, 31, 57, 1889, 18, 16964, 968, 1649, 15, 31, 259, 20, 1207, 65, 1704, 3755, 27, 1207, 5167, 10840, 9, 13, 1, 472, 306, 45, 5739, 530...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
App crashes on orientation change after removing a subview from superview iphone/iPad === I don't know what is going wrong in here but my app crashes right when I change my orientation after removing a subview from its superview. I did not find any links which helped me to solve this issue. Here is the code where I am adding my imageView as a subview of superview. UIImageView* framebadgeOrAccessoryImage = [[UIImageView alloc]initWithFrame:tempFrameAfter]; [framebadgeOrAccessoryImage setCenter:self.view.center]; [framebadgeOrAccessoryImage setContentMode:UIViewContentModeScaleToFill]; [framebadgeOrAccessoryImage setImage:frameImage]; [framebadgeOrAccessoryImage setTag:TAG_FOR_FRAME_VIEW]; [framebadgeOrAccessoryImage setObservationInfo:@"Frame"]; [framebadgeOrAccessoryImage setExclusiveTouch:YES]; [framebadgeOrAccessoryImage setAutoresizingMask:UIViewAutoresizingNone]; [framebadgeOrAccessoryImage setMultipleTouchEnabled:NO]; [framebadgeOrAccessoryImage setBackgroundColor:[UIColor clearColor]]; [framebadgeOrAccessoryImage setUserInteractionEnabled:YES]; [imageArea addSubview:framebadgeOrAccessoryImage]; [framebadgeOrAccessoryImage release]; In the above code, "imageArea" is a superview which is of kind "UIImageView". I am adding "framebadgeOrAccessoryImage" as a subview of "imageArea". This is the code for removing the subview from superview(imageArea). [((UIImageView*)[self.view viewWithTag:TAG_FOR_FRAME_VIEW])removeFromSuperview]; After deletion of this subview, I can carry out other tasks without any problem until I change the orientation of the device. I haven't override delegate methods like "willAnimateRotationToInterfaceOrientation" or any other orientation changing delegate methods except "shouldAutorotateToInterfaceOrientation". Here is my "shouldAutorotateToInterfaceOrientation" function. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } Please help me with the solution.
0
[ 2, 4865, 21563, 27, 10245, 753, 75, 9096, 21, 972, 4725, 37, 1026, 4725, 21024, 118, 49, 8240, 800, 3726, 3726, 31, 221, 22, 38, 143, 98, 25, 228, 1389, 19, 235, 47, 51, 4865, 21563, 193, 76, 31, 753, 51, 10245, 75, 9096, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Arc Based Text Alignment in D3 === I'm trying to create a [Radial Hub and Spoke diagram][1] (http://bl.ocks.org/3169420) with D3 that uses arcs of a pie to represent relationships to and/or from a node of context. In other words, I'm trying to create a 360 degree view of a node's relationships. In the example above, "Node 1" is in the center. I can't get the textual node names for related nodes #8 - #18 to align "outside" the wheel. Would anyone know what the best way is to do so? The code that I'm using looks as follows... // Add node names to the arcs, translated to the arc centroid and rotated. arcs3.filter(function(d) { return d.endAngle - d.startAngle > .2; }).append("svg:text") .attr("dy", "5px") .attr("angle", function(d) { return angle(d); }) .attr("text-anchor", function(d) { return angle(d) < 0 ? "start" : "end"; }) .attr("transform", function(d) { //set text'ss origin to the centroid // Make sure to set these before calling arc.centroid d.innerRadius = (height/2); // Set Inner Coordinate d.outerRadius = (height/2); // Set Outer Coordinate return "translate(" + arc3.centroid(d) + ")rotate(" + angle(d) + ")"; }) .style("fill", "Black") .style("font", "normal 12px Arial") .text(function(d) { return d.data.name; }); // Computes the angle of an arc, converting from radians to degrees. function angle(d) { var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90; return a > 90 ? a - 180 : a; } The issue seems to be that I need to evaluate the X and Y coordinates of where the Node labels are placed. However, I can't seem to correctly find/access those X and Y values. Thanks, in advance, for any help you can offer. My Best, Frank [1]: http://bl.ocks.org/3169420
0
[ 2, 4686, 432, 1854, 12448, 19, 13, 43, 240, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 636, 9560, 192, 5814, 17, 1977, 14161, 500, 2558, 165, 500, 13, 5, 21127, 6903, 6287, 9, 5668, 18, 9, 5583, 16842, 14009, 18021, 6, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
last footer on subreport === The last page footer of the subreport doesn't go at the bottom page. The reason I put last page footer on subreport its because I want to display the grandtotal and im using the subreport summary band in the next page. I would like to make the last page footer of the subreport to print at the bottom of the report.
0
[ 2, 236, 1749, 106, 27, 972, 17437, 800, 3726, 3726, 14, 236, 2478, 1749, 106, 16, 14, 972, 17437, 1437, 22, 38, 162, 35, 14, 2129, 2478, 9, 14, 1215, 31, 442, 236, 2478, 1749, 106, 27, 972, 17437, 82, 185, 31, 259, 20, 3042, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Code works fine in PHP 5.4.3 but not int 5.3.8 === I have the following line of code that is throwing an error when used in PHP 5.3.1 and 5.3.8 and I presume all of 5.3.x. Only noticed it when I uploaded it to a server as it works fine on my local PHP 5.4.3 if (isset($args[0]['field_date']['und'][0]['value']['date'])) { // Do stuff } The error that is coming up is - Cannot use string offset as an array in my_module.module line 9
0
[ 2, 1797, 693, 1123, 19, 13, 26120, 331, 9, 300, 9, 240, 47, 52, 19, 38, 331, 9, 240, 9, 457, 800, 3726, 3726, 31, 57, 14, 249, 293, 16, 1797, 30, 25, 6033, 40, 7019, 76, 147, 19, 13, 26120, 331, 9, 240, 9, 165, 17, 331, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple HTTPS code === Hi I'm trying to recieve a message via curl into wso2 esb on port 9090 (which is set up in axis2.xml) using the following code `<proxy xmlns="http://ws.apache.org/ns/synapse" name="att2" transports="https" statistics="enable" trace="enable" startOnLoad="true"> <target faultSequence="fileWriteSequence" endpoint="conf:/users"> <outSequence> <send /> </outSequence> </target> <parameter name="enableMTOM">false</parameter> </proxy>' the curl command i'm using is: `curl -d this is a test" http://localhost:9090` I dont see the file coming through on my stats and the response back from the curl command is "Empty reply from server" any ideas?
0
[ 2, 1935, 7775, 18, 1797, 800, 3726, 3726, 4148, 31, 22, 79, 749, 20, 302, 10486, 195, 21, 2802, 1197, 14320, 77, 619, 656, 135, 13, 160, 220, 27, 1295, 3151, 3165, 13, 5, 2140, 25, 309, 71, 19, 8577, 135, 9, 396, 8184, 6, 568,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Coldfusion Google Maps and Jquery === I have a google map which has dynamic markers and info boxes from a coldfusion query, i would like to be able to open the infowindow from a link on the page, i am using jquery for that but it is not working, what is the best way to do it. My Script: var map; var lastinfowindow; function initialize() { // Create an array of styles. var styles = [ { stylers: [ { hue: "#0b9cc1" }, { saturation: -20 } ] },{ featureType: "road", elementType: "geometry", stylers: [ { lightness: 100 }, { visibility: "simplified" } ] },{ featureType: "administrative.country", elementType: "labels", stylers: [ { visibility: "on" } ] }, { featureType: "water", elementType: "geometry", stylers: [ { visibility: "on" }, { lightness: -10 }] }, { featureType: "poi", stylers: [ { visibility: "on" } ] } ]; // Create a new StyledMapType object, passing it the array of styles, // as well as the name to be displayed on the map type control. var styledMap = new google.maps.StyledMapType(styles, {name: "Styled Map"}); var latlng = new google.maps.LatLng(40, 13); var mapOptions = { zoom: 4, center: latlng, mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style'] }; map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions); var image = 'sp-mark.png'; LatLng = new google.maps.LatLng ('23.00593', '120.65287'); var marker38 = new google.maps.Marker({ map: map, position: LatLng, title: 'Event 1 - 38', icon:image }); var infowindow38 = new google.maps.InfoWindow({ content: "<h3 class=maph3>Event 1</h3><p>Location: Tiawan</p>" }); google.maps.event.addListener(marker38, 'click', function() { infowindow38.open(map,marker38); marker38.gig_id = 38; marker38.infowindow = infowindow38; markers[markers.length] = marker38; }); LatLng = new google.maps.LatLng ('52.19173', '-1.7083'); var marker30 = new google.maps.Marker({ map: map, position: LatLng, title: 'Event 2 - 30', icon:image }); var infowindow30 = new google.maps.InfoWindow({ content: "<h3 class=maph3>Event 2</h3><p>Location: UK</p>" }); google.maps.event.addListener(marker30, 'click', function() { infowindow30.open(map,marker30); marker30.gig_id = 30; marker30.infowindow = infowindow30; markers[markers.length] = marker30; }); LatLng = new google.maps.LatLng ('38.98083', '1.30056'); var marker32 = new google.maps.Marker({ map: map, position: LatLng, title: 'Event 3 - 32', icon:image }); var infowindow32 = new google.maps.InfoWindow({ content: "<h3 class=maph3>Event 3</h3><p>Location: Ibiza</p>" }); google.maps.event.addListener(marker32, 'click', function() { infowindow32.open(map,marker32); marker32.gig_id = 32; marker32.infowindow = infowindow32; markers[markers.length] = marker32; }); LatLng = new google.maps.LatLng ('38.96', '1.39861'); var marker41 = new google.maps.Marker({ map: map, position: LatLng, title: 'Event 4 - 41', icon:image }); var infowindow41 = new google.maps.InfoWindow({ content: "<h3 class=maph3>Event 4</h3><p>Location: Ibiza</p>" }); google.maps.event.addListener(marker41, 'click', function() { infowindow41.open(map,marker41); marker41.gig_id = 41; marker41.infowindow = infowindow41; markers[markers.length] = marker41; }); LatLng = new google.maps.LatLng ('-33.92528', '18.42389'); var marker47 = new google.maps.Marker({ map: map, position: LatLng, title: 'Event 5 - 47', icon:image }); var infowindow47 = new google.maps.InfoWindow({ content: "<h3 class=maph3>Event 5</h3><p>Location: Cape Town</p>" }); google.maps.event.addListener(marker47, 'click', function() { infowindow47.open(map,marker47); marker47.gig_id = 47; marker47.infowindow = infowindow47; markers[markers.length] = marker47; }); //Associate the styled map with the MapTypeId and set it to display. map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); $(".order").click(function() { var thisorder = $(this).data("gig_id"); for(var i=0; i<markers.length; i++) { if(markers[i].gig_id == thisorder) { console.log("found my match"); //get the latlong if(lastinfowindow instanceof google.maps.InfoWindow) lastinfowindow.close(); console.dir(markers[i]); map.panTo(markers[i].getPosition()); markers[i].infowindow.open(map, markers[i]); lastinfowindow = markers[i].infowindow; } } }); } This is the body: <style> #map_canvas { width: 1250px; height: 550px; float:left; } #orders { margin-top: 0px; padding-top: 0px; margin-left: 10px; float:left; height: 550px; } .order { border-style:solid; border-width:thick; width: 300px; padding: 5px; cursor:pointer; margin-top:0px; font-family:Arial, Helvetica, sans-serif; } </style> <body onload="initialize()"> <div id="map_canvas"></div> <div id="orders"> <p class="order" data-gig_id="38"> <b>Event 38</b><br/> Event 1 </p> <p class="order" data-gig_id="30"> <b>Event 30</b><br/> Event 2 </p> <p class="order" data-gig_id="32"> <b>Event 32</b><br/> Event 3 </p> <p class="order" data-gig_id="41"> <b>Event 41</b><br/> Event 4 </p> <p class="order" data-gig_id="47"> <b>Event 47</b><br/> Event 5 </p> </div> </body> I am using jquery to create the click function . I have already outputted the results, the map works fine but the links on the page to open the infowindow do not work, i am using an example by Raymond Camden. Any help would be greatly appreciated.
0
[ 2, 1191, 9818, 8144, 6867, 17, 487, 8190, 93, 800, 3726, 3726, 31, 57, 21, 8144, 2942, 56, 63, 7782, 19482, 17, 15404, 8120, 37, 21, 1191, 9818, 25597, 15, 31, 83, 101, 20, 44, 777, 20, 368, 14, 15404, 27508, 37, 21, 3508, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
cmd java wait for process === I'm writing an application with a Java GUI which calls some FORTRAN code. I want to return a file (solution.ps) which is updated and compiled based on changes in the FORTRAN code, which are created earlier in my ActionPerformed method. However the code I have at present just returns the old version of the file rather than waiting for the updated results of the cmd compilation. Is there a way to make the cmd wait for the process to run before completing the next step? (It works fine running directly from cmd) I've searched but can't find anything except process.waitFor() which won't seem to pause the execution at the right point. Tried Thread.waitFor() too. I'm thinking this could be useful for anyone who wants to send user inputs to another program and return a compiled result which uses these inputs. Anyway here is the code, thanks in advance for any help and I hope I made the problem clear. String[] command ={"cmd",}; try { Process p = Runtime.getRuntime().exec(command); new Thread(new SyncPipe(p.getErrorStream(), System.err)).start(); new Thread(new SyncPipe(p.getInputStream(), System.out)).start(); PrintWriter stdin = new PrintWriter(p.getOutputStream()); stdin.println("cd c:\\g77"); stdin.println("g77setup.bat"); stdin.println("cd c:\\users\\laurence\\workspace\\areaplanner"); stdin.println("g77 -O4 genpack.f -o genpack"); stdin.println("genpack"); stdin.println("5"); /* * The following line sets the time to run the FORTRAN code for * - need to wait for this to complete before calling mpost */ stdin.println("30"); stdin.println("mpost solution.mp"); stdin.println("latex solution.tex"); stdin.println("dvips solution.dvi -o solution.ps"); stdin.close(); } catch(IOException e4){}
0
[ 2, 2390, 43, 8247, 1760, 26, 953, 800, 3726, 3726, 31, 22, 79, 1174, 40, 3010, 29, 21, 8247, 9457, 56, 3029, 109, 26, 17685, 1797, 9, 31, 259, 20, 788, 21, 3893, 13, 5, 18, 18687, 3309, 9, 1919, 6, 56, 25, 6372, 17, 9316, 43...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
preg_match with international characters and accents === I would like to validate a string with a pattern that can only contain letters (including letters with accents). Here is the code I use and it always returns "nok". I don't know what I am doing wrong, can you help? thanks $string = 'é'; if(preg_match( '/^[\p{L}]+$/i', $string)) { echo 'ok'; } else{ echo 'nok'; }
0
[ 2, 782, 263, 1, 12280, 29, 294, 1766, 17, 7980, 18, 800, 3726, 3726, 31, 83, 101, 20, 7394, 1373, 21, 3724, 29, 21, 3732, 30, 92, 104, 3717, 2516, 13, 5, 3970, 2516, 29, 7980, 18, 6, 9, 235, 25, 14, 1797, 31, 275, 17, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mootools document.getelement is not a function === I'm trying to convert Joomla 1.5 plug-in to Joomla 2.5 plug-in. As this plug-in is run the fire bug says `TypeError: document.getElement is not a function. Here is my code.... var btn = document.getElement("#imageForm fieldset div [onclick=\"\"]"); console.log(btn); if (btn.getAttribute("onclick").indexOf("ImageManager") > -1 ) { if (typeof window.parent.'.$request['rewrite_function'].' === "function") { btn.setAttribute("onclick",btn.getAttribute("onclick").replace("ImageManager.onok()","window.parent.'.$request['rewrite_function'].'()")) } } I have been stuck on this for hours now and i can't get it to work. Could you please tell me what is wrong with this javascript or atleast point me in the right direction.
0
[ 2, 13, 8765, 20799, 18, 4492, 9, 3060, 27567, 25, 52, 21, 1990, 800, 3726, 3726, 31, 22, 79, 749, 20, 8406, 2640, 2636, 531, 137, 9, 264, 10922, 8, 108, 20, 2640, 2636, 531, 172, 9, 264, 10922, 8, 108, 9, 28, 48, 10922, 8, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
DNS Taking a couple of attempts to resolve everytime === I seem to be having some issues with my domain controller when trying to resolve hostnames using dns. It does seem to work but it always takes a couple of attempts, even if its a hostname i have already resolved. I have been noticing it with webpages and downloads. Here is a nslookup test i did C:\Users\chris.townsend>nslookup abc.com Server: dc.example.com Address: 192.168.101.20 DNS request timed out. timeout was 2 seconds. *** Request to dc.example.com timed-out C:\Users\chris.townsend>nslookup abc.com Server: dc.example.com Address: 192.168.101.20 Non-authoritative answer: Name: abc.com Address: 199.181.132.250 Some sites it works first time and some it takes a couple more. I cant seem to figure it out and its the same on all the systems in our office. Restarting and /dnsflush dont seem to make any diffence either.
0
[ 2, 13, 43, 2172, 741, 21, 1335, 16, 3265, 20, 9854, 352, 891, 800, 3726, 3726, 31, 2260, 20, 44, 452, 109, 1549, 29, 51, 4603, 9919, 76, 749, 20, 9854, 2015, 7259, 18, 568, 13, 43, 2172, 9, 32, 630, 2260, 20, 170, 47, 32, 55...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Font increase and decrease on click === I have a '+' and '-' button in my page. On clicking '+' I need to increase font size by 10px, again onclick will increase size by 12. Same way for '-' it decrements. How can I write css class for that? <ul id="box"> <li><a title="t1" id="SizePlus" href="#"></a></li> <li><a title="t2" id="SizeMinus" href="#"></a></li> </ul> #box { list-style-type: none; display: block; clear: both; } #box li a { display: block; float: left; width: 25px; height: 25px; margin: 0px 10px 0px 0px; text-indent: -10000px; }
0
[ 2, 9978, 1839, 17, 9826, 27, 10840, 800, 3726, 3726, 31, 57, 21, 13, 22, 2430, 22, 17, 13, 22, 8, 22, 5167, 19, 51, 2478, 9, 27, 25590, 13, 22, 2430, 22, 31, 376, 20, 1839, 9978, 1072, 34, 332, 306, 396, 15, 188, 27, 150, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
comment db not getting updated in asp .net === I am trying to create a simple blog application using asp.net. I am a novice and trying to teach myself c# and asp .net mvc. The problem that I am facing is that when I try to add a comment to a post then a Null line gets added to the comment database instead of the values that I put in. What am I doing wrong? My code is below: Blog - class public class Blog { public int BlogID { get; set; } public string Title { get; set; } public string Writer { get; set; } [DataType(DataType.MultilineText)] public string Excerpt { get; set; } [DataType(DataType.MultilineText)] public string Content { get; set; } [DataType(DataType.Date)] public DateTime PublishDate { get; set; } public virtual ICollection<Comment> Comments { get; set; } } Comment - class public class Comment { public int CommentID { get; set; } public string Name { get; set; } [DataType(DataType.EmailAddress)] public string Email { get; set; } [DataType(DataType.MultilineText)] public string CommentBody { get; set; } public virtual int BlogID { get; set; } public virtual Blog Blog { get; set; } } BlogDetailViewModel public class BlogDetailsViewModel { public Blog Blog { get; set; } public Comment Comment { get; set; } } Blog - Details controller public ViewResult Details(int id) { Blog blog = db.Blogs.Find(id); BlogDetailsViewModel viewModel = new BlogDetailsViewModel {Blog = blog}; return View(viewModel); } Blog Details - view @model NPLHBlog.ViewModels.BlogDetailsViewModel has code to display blogpost + comment form at end of blog details page below: @using (Html.BeginForm("Create", "Comment")) { <input type="hidden" name="BlogID" value="@Model.Blog.BlogID" /> <div class="editor-label"> @Html.LabelFor(model => model.Comment.Name) </div> <div class="editor-field"> @Html.EditorFor(model => model.Comment.Name) @Html.ValidationMessageFor(model => model.Comment.Name) </div> <div class="editor-label"> @Html.LabelFor(model => model.Comment.Email) </div> <div class="editor-field"> @Html.EditorFor(model => model.Comment.Email) @Html.ValidationMessageFor(model => model.Comment.Email) </div> <div class="editor-label"> @Html.LabelFor(model => model.Comment.CommentBody) </div> <div class="editor-field"> @Html.EditorFor(model => model.Comment.CommentBody) @Html.ValidationMessageFor(model => model.Comment.CommentBody) </div> <p> <input type="submit" value="Add Comment" /> </p> comment - create controller public class CommentController : Controller { private NPLHBlogDb db = new NPLHBlogDb(); // // GET: /Comment/ public ActionResult Create(Comment c) { Blog blog = db.Blogs.Single(b => b.BlogID == c.BlogID); blog.Comments.Add(c); db.SaveChanges(); return RedirectToAction("Details", "Blog", new { ID = c.BlogID }); } Any help would be grateful.
0
[ 2, 6484, 13, 9007, 52, 1017, 6372, 19, 28, 306, 13, 9, 2328, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 1935, 8146, 3010, 568, 28, 306, 9, 2328, 9, 31, 589, 21, 21999, 17, 749, 20, 5348, 992, 272, 5910, 17, 28, 306, 13, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get Monthly-wise data using EntityFramework === In my table `TimeTable` I've columns like `Title,FromDate,ToDate` etc., I'am trying to get the results in monthly basis. For this, I tried by using the Entity Framework like, DataObject.Entities entities=new DataObject.Entities(); DataObject.TimeTable timeTable = entities.TimeTables.First(t=>t.FromDate.Month<=DateTime.Now.Month && t.ToDate.Month>DateTime.Now.Month) { // } but here, its showing error in the `t.FromDate.Month` its showing error like `<System.DateTime> doesn't contain definition for Month`......how can I fix this, can anyone help me here,
0
[ 2, 164, 6460, 8, 10474, 1054, 568, 9252, 8361, 3783, 800, 3726, 3726, 19, 51, 859, 13, 1, 891, 5924, 1, 31, 22, 195, 7498, 101, 13, 1, 22235, 15, 2665, 8209, 15, 262, 8209, 1, 2722, 9, 15, 31, 22, 765, 749, 20, 164, 14, 1736...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
place 2 divs inside a wrapper of different width without fixing the width of the second div === i have my html something like this... <div class = "content"> <div class = "folder-list"> </div> <div class = "message-list"> </div> </div> Now my **folder-list** div size is 160px. Now I want the **message-list** div to take rest of the width of the content class which is set to 100%(width of the content). I dont want to fix the width for **message-list** in the CSS. How can I achieve that? I have added *float:left* property to both the divs.
0
[ 2, 209, 172, 13, 12916, 18, 572, 21, 28051, 16, 421, 9456, 366, 20047, 14, 9456, 16, 14, 153, 13, 12916, 800, 3726, 3726, 31, 57, 51, 13, 15895, 301, 101, 48, 9, 9, 9, 13, 1, 12916, 718, 800, 13, 7, 25424, 7, 1, 13, 1, 129...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to rotate image and save the image using jquery === In my application i have an image in a div,a button. I want to rotate the image displayed and save the rotated image when i clicked on the button using jquery. I already used the code: [http://code.google.com/p/jquery-rotate/][1] [1]: http://code.google.com/p/jquery-rotate/ and jquery code: $(function() { // doc ready var rotation = 0; // variable to do rotation with $("#img").click(function() { rotation = (rotation + 45) % 360; // the mod 360 probably isn't needed $("#cropbox").rotate(rotation); }); }); html code: <img src="demo_files/pool.jpg" id="cropbox" /> <input type="button" id="img" name="img" value="click" /> When i using above code ,There have two images one is the old image and another is the rotated image. Here i want to rotate the same image and displaying only the rotated image .And save the rotated image ina directory. How can i do this using jquery?
0
[ 2, 184, 20, 21448, 1961, 17, 2079, 14, 1961, 568, 487, 8190, 93, 800, 3726, 3726, 19, 51, 3010, 31, 57, 40, 1961, 19, 21, 13, 12916, 15, 58, 5167, 9, 31, 259, 20, 21448, 14, 1961, 6115, 17, 2079, 14, 24107, 1961, 76, 31, 15802...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the best way to display ASCII in a grid with panels using Java? === I don't have much experience in Java, but I am attempt to write a simple rogue-like game to familiarize myself with it, and I am just wondering how I would go about creating an interface like this: ![A screen from JADE by Thomas Biskup][1] [1]: http://i.stack.imgur.com/sETi9.jpg Are there any obvious ways that you would go about something like this? Being new to Java, I really have no idea what the best method would be. Sorry to be vague! Thanks
0
[ 2, 98, 25, 14, 246, 161, 20, 3042, 28, 1892, 49, 19, 21, 7354, 29, 9449, 568, 8247, 60, 800, 3726, 3726, 31, 221, 22, 38, 57, 212, 1496, 19, 8247, 15, 47, 31, 589, 1735, 20, 2757, 21, 1935, 12018, 8, 1403, 250, 20, 3694, 295...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting KeyPress event from Control filled with other Controls - Currently not working === If a control is empty and you press a key, the event gets fired but if some other control is on the control checking for KeyPress events they aren't fired. Currently, I'm trying to have one "Control" that handles 4 other controls so when a key is pressed on the Main Control it should do something on one of the four controls. (Depending on which one is the active one) But since they're above the main control, the main control doesn't get the event. Are there any ways to solve this? The four controls fill up 100% of the MainControl. But instead of adding 4 event handlers to their control I want to add one to the main control.
0
[ 2, 1017, 1246, 5890, 807, 37, 569, 1943, 29, 89, 8671, 13, 8, 871, 52, 638, 800, 3726, 3726, 100, 21, 569, 25, 2424, 17, 42, 901, 21, 1246, 15, 14, 807, 3049, 3899, 47, 100, 109, 89, 569, 25, 27, 14, 569, 9886, 26, 1246, 589...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to access nested iframes? === I need to send post message to iframe. <br/> currently its working if i have single iframe inside parent page.But I want to make it work for nested iframes.<br/> Criterias are : - I can just add listener code in last leaf iframe. - Do not know length of iframe nesting. - Need both way communication , from parent to child also by leaf iframe to parent. I am sick of third part iframes , please suggest me some appropriate solution.
0
[ 2, 184, 20, 1381, 5618, 69, 31, 8361, 18, 60, 800, 3726, 3726, 31, 376, 20, 2660, 678, 2802, 20, 31, 8361, 9, 13, 1, 5145, 118, 1, 871, 82, 638, 100, 31, 57, 345, 31, 8361, 572, 4766, 2478, 9, 811, 31, 259, 20, 233, 32, 17...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customize the drop down list in html === I have defined a drop down list as follows. I am using it on Android with phonegap. I want to customize the drop down list from within the html. I want to appear it as a dropdown without it coming to the front. Is it possible? <html> <head> <title>Title</title> <script type="text/javascript" src="phonegap-1.4.1.js"></script> <script type="text/javascript" src="JS/Util.js"></script> <script type="text/javascript" src="JS/Language.js"></script> <script type="text/javascript"> function dropdown(){ var drp = document.getElementById("numberlist"); var optn = document.createElement("OPTION"); optn.text="3"; optn.value="3"; drp.add(optn); } </script> </head> <body onload="dropdown();"> <div id="main3"></div> <form><select id = "numberlist"><option>12</option><option>24</option><option>36</option></select></form> </body> </html>
0
[ 2, 5816, 2952, 14, 2804, 125, 968, 19, 13, 15895, 800, 3726, 3726, 31, 57, 2811, 21, 2804, 125, 968, 28, 2415, 9, 31, 589, 568, 32, 27, 13005, 29, 1132, 1136, 306, 9, 31, 259, 20, 5816, 2952, 14, 2804, 125, 968, 37, 363, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
datacontract attribute is required in WCF? === is in WCF DataContract attribute is required? I have a class that class is not marked with DataContract or property with DataMember. When i deploy wcf service on 4 server, out 4 service works fine on 3 server and failed on 1 server with message "Type 'Class' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute." So is there any settings in web.config or machine.config or in IIS where i can mandate to use serializer in code? or i can specify to use default serializer if no attribute is specified ? Thanks, krishna
0
[ 2, 1054, 23311, 35, 14755, 25, 1390, 19, 11801, 410, 60, 800, 3726, 3726, 25, 19, 11801, 410, 1054, 23311, 35, 14755, 25, 1390, 60, 31, 57, 21, 718, 30, 718, 25, 52, 2739, 29, 1054, 23311, 54, 1354, 29, 1054, 6990, 9, 76, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails 3.1 Savon soap request giving Timeout::Error: Timeout::Error ut using curl i get response === I am having trouble to construct the soap client using savon in rails 3.1. But i am able to successfully get the response when i try to make the request from the curl command line. My curl request from command line look like this curl -d @Downloads/test.xml -H "content-type: text/xml;charset=UTF-8" -H "SOAPAction: http://services.bamnetworks.com/registration/identityPoint/create" "https://qaservices.bamnetworks.com/ws/services/IdentityPointService" -v From which i got a perfect response like this. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><identityPoint_create_response xmlns="http://services.bamnetworks.com/registration/types/1.6"><status><code>-2000</code><message> [Duplicate credential constraint violated] [com.bamnetworks.registration.types.exception.DuplicateCredentialException]</message><exceptionClass>com.bamnetworks.registration.types.exception.DuplicateCredentialException</exceptionClass> But when i try to make a request from Savon client every time i am getting the HTTPI executes HTTP POST using the net_http adapter Timeout::Error: Timeout::Error My Savon request look like this client = Savon::Client.new do |wsdl, http| http.auth.ssl.verify_mode = :none wsdl.document = "https://qaservices.bamnetworks.com/ws/services/IdentityPointService?wsdl" end begin response = client.request :ns, :identityPoint_create_request do |soap, wsdl, http| http.headers['SOAPAction'] = 'http://services.bamnetworks.com/registration/identityPoint/create' http.headers = { "Content-Length" => "0", "Connection" => "Keep-Alive" } soap.namespaces["xmlns:ns0"]="http://services.bamnetworks.com/application/types/1.0" soap.header = { "ns0:appCredentials" => { "ns0:name"=>"XXXXXXX", "ns0:password"=>"XXXXXXXXX" } } soap.body ={ :identification => { :email => { :address => "mlb_user@mlb.com" }, :password => { :address => { :id => 44 } } }, :profileProperty => { :name => "birthDay", :value => "17" }, :profileProperty => { :name => "birthMonth", :value => "8" }, :profileProperty => { :name => "birthYear", :value => "1986" }, :attributes! => { :identification => { :type => "email-password" } } } end I dont know where i am making the mistake. If anybody help me in this to figure it out. Thanks!
0
[ 2, 2240, 18, 203, 9, 165, 13, 18, 11511, 6447, 3772, 1438, 85, 1320, 45, 45, 29992, 45, 85, 1320, 45, 45, 29992, 13, 1982, 568, 14320, 31, 164, 1627, 800, 3726, 3726, 31, 589, 452, 2572, 20, 6960, 14, 6447, 6819, 568, 13, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Jquery mobile + Php authentication system === I'm writing an authentication system with mobile jquery and php. The html code is as follows: <div data-role = "page" id ="dialogo"> <a href = "#identificacion" id = "formdialog" data-rel="dialog"> </a> </div> <div data-role = "page" id = "identificacion"> <div id ="main"> <div id ="caplogin"> <img src = "images/vives_logo.png"/> <p> Acceso Promoción Vives </p> <div style ="clear:both;"></div> </div> <div style ="clear:both;"></div> <div id ="formlogin"> <form name ="formautentificacion" id ="formautentificacion" method = "post" action = "" data-ajax="false"> <table> <tr> <td> Login </td> <td> <input type ="text" name ="user" id ="user" size="30"/></td> </tr> <tr> <td> Password </td><td><input type ="password" name ="pass" id="pass" size="30"/></td></tr> <tr> <td colspan = "2" align ="right"> <input type = "submit" id = "sbmt_aut" name = "sbmt_aut" value = "ENTRAR"/></td> </table> </form> </div> </div> </div> <div data-role = "page" id = "pageclients"> <div id = "headerpageclient"> <a href="index.php" class ="logout" data-role="button" data-icon="delete">SALIR</a> </div> <div id = "clientes"> </div> </div> <div data-role = "page" id = "pagepuntosventa"> <div id = "headerpagepuntoventa"> </div> </div> I have two ajax function to start and destroy php sessions, and use changepage it according with ajax response, for login the the functionality is correct and logout, but the safari back button doesn't working and falls on the last page. $(document).delegate("#dialogo", "pageinit", function() { $("#formdialog").click(); }) $(document).delegate("#identificacion", "pageinit", function() { $("#formautentificacion").submit(function(e){ e.preventDefault(); //e.stopImmediatePropagation(); $.ajax({ type: 'POST', url: 'ax/login.php', data:$(this).serialize(), cache: false, success: function(data) { if(data == 1) { //$.mobile.changePage("promocion.php", {transition: "flip"}); //window.location = "index.php"; $.mobile.changePage("#pageclients", {transition: "flip"}); } else { if (data == 2) alert("Usuario bloqueado, 3 intentos fallidos"); else alert("Error en la identificación"); } $("#user").val(""); $("#pass").val(""); } }) }) $(".logout").click(function(e){ //e.preventDefault(); logout(); }) }) $(document).delegate("#pageclients", "pageinit", function() { seguridad(); }) Function seguridad() for check that session is on: session_start(); include("../class/aut.php"); $aut = new aut(); $res = 0; if (!empty($_SESSION["usuario"]) && !empty($_SESSION["token"]) ) { $_SESSION["usuario"] = mysql_real_escape_string($_SESSION["usuario"]); $_SESSION["token"] = mysql_real_escape_string($_SESSION["token"]); if ( $aut->checktoken($_SESSION["usuario"],$_SESSION["token"]) ) { $_SESSION["token"] = md5(rand().$_SESSION["usuario"]); $aut->updateToken($_SESSION["usuario"], $_SESSION["token"]); $res = 1; } else { session_destroy(); session_unset(); $res = 0; //header("Location: index.php"); //exit; } } else { session_destroy(); session_unset(); $res = 0; //header("Location: index.php"); //exit; } echo $res; ?> And function logout: function logout() { $.ajax({ type: 'GET', url: 'ax/logout.php', cache:false, //async: false, success: function(data) { $("#formdialog").click(); } }) } I try to close the session and then on each page with the security function to verify the session. But once destroyed the session I can go back to a page and not skip dialogue. Any ideas?
0
[ 2, 487, 8190, 93, 3241, 2754, 13, 26120, 27963, 329, 800, 3726, 3726, 31, 22, 79, 1174, 40, 27963, 329, 29, 3241, 487, 8190, 93, 17, 13, 26120, 9, 14, 13, 15895, 1797, 25, 28, 2415, 45, 13, 1, 12916, 1054, 8, 661, 413, 800, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How does a URL identification system like that of Doodle work? === When you create a poll on Doodle you are provided with two URLs: The invite URL: doodle.com/82n9k5if635kn5xz And the administration URL: doodle.com/82n9k5if635kn5xz5by2zkhu/admin The admin URL adds the extra bit 5by2zkhu to the poll id (82n9k5if635kn5xz). I'm guessing this is to identify the user as a poll admin. First, how is the poll ID generated? It needs to be reasonably opaque to prevent users from changing a single character in the ID and gaining access to someone else's poll. Would hashing a combination of the poll's name, uniqid(), and/or rand() be a good option for this? Second, would the poll ID we see in the URL also act as the primary key in the polls table, or would you say that each poll would also have an integer ID as well? If so, why? Is it more computationally heavy to search for 82n9k5if635kn5xz as opposed to 1738495726384653? Would 82n9k5if635kn5xz be stored simply as text in a MySQL DB?
0
[ 2, 184, 630, 21, 287, 6362, 8575, 329, 101, 30, 16, 13, 12473, 8271, 170, 60, 800, 3726, 3726, 76, 42, 1600, 21, 4994, 27, 13, 12473, 8271, 42, 50, 1173, 29, 81, 13, 911, 7532, 45, 14, 10275, 287, 6362, 45, 13, 12473, 8271, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
add a class in AJAX if a returned value is true === Afternoon, I would like to know how i can add a class depending on the returned value from a web service. $.each(result, function (index, res) { new_record = "<tr>" + "<th scope=\"row\" class=\"t-left\"><a href=\"editproduct.aspx?sku=" + res.sku + "\" title=\"Edit this product listing\">" + res.title + "</a></th>" + "<td><a href=\"http://www.amazon.co.uk/dp/" + res.asin + "\" target=\"_blank\" title=\"Visit the Amazon product listing\" >" + res.asin + "</a></td>" + "<td>" + res.sku + "</td>" + "<td>" + res.stock + "</td>" + "<td> £" + res.price + "</td>" + "<td>" + res.live + "</td>" + "</tr>"; $('#dataResults').append(new_record); I am also returning a value stockUpdated, and i would like to add a class to change the color of the stock table field depending if this comes back true. I cant remember how i have done this previously but its similar to an if statement Many thanks in advance. Alan
0
[ 2, 3547, 21, 718, 19, 20624, 100, 21, 587, 1923, 25, 1151, 800, 3726, 3726, 3435, 15, 31, 83, 101, 20, 143, 184, 31, 92, 3547, 21, 718, 4758, 27, 14, 587, 1923, 37, 21, 2741, 365, 9, 5579, 9, 14322, 5, 29955, 15, 1990, 13, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ComboBox bound to ObervableCollection - how can I create and set a default value in my XAML? === I have an observable collection that is populating a combo box. <telerik:RadComboBox Grid.Row="0" ItemsSource="{Binding ListOfNumbers}" DisplayMemberPath="Name" EmptyText="All" SelectedItem="{Binding SelectedNumber, Mode=TwoWay}"/> As you can see, at the moment I have the `EmptyText` property set to "All". This works perfectly, in the method where the value of this combobox is used, I check it, if it is `== ""`, if it is, then it retrieves all data. This is what happens when I first open my view, with nothing selected. The problem is, when I select a number, I can no longer select "All", which is quite annoying as I would like to be able to. How can I add this choice to my comboBox and make it save a value of "" to my dependency property, `SelectedNumber` ?
0
[ 2, 22621, 5309, 4138, 20, 8578, 710, 579, 15015, 872, 13, 8, 184, 92, 31, 1600, 17, 309, 21, 12838, 1923, 19, 51, 13, 6791, 8184, 60, 800, 3726, 3726, 31, 57, 40, 5122, 10321, 579, 1206, 30, 25, 1675, 10038, 21, 22621, 1649, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python Script to Extract Zip Files with non-Unicode non-Latin Filenames === I can't believe nobody wrote it in a blog. Or did I just fail to find one? Out of necessity I wrote one myself. Hope it comes handy for someone. Any suggestions are welcome, especially if you know this will not work in some special cases. Please don't pick on the untidy coding style. import os,sys,zipfile x, fn = sys.argv enc = 'utf-8' zipf = zipfile.ZipFile(fn) for x in zipf.infolist(): fn = x.filename fne = fn.encode(enc) if os.sep in fne: path = fne[:fne.rindex(os.sep)] if not os.path.exists(path): os.makedirs(path) if fne.endswith(os.sep): continue f = open(fne,'wb') f.write(zipf.open(fn).read()) f.close()
0
[ 2, 20059, 3884, 20, 10962, 12133, 6488, 29, 538, 8, 8843, 9375, 538, 8, 10577, 3893, 7259, 18, 800, 3726, 3726, 31, 92, 22, 38, 985, 5908, 738, 32, 19, 21, 8146, 9, 54, 144, 31, 114, 7476, 20, 477, 53, 60, 70, 16, 14981, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Email signed with bouncycastle can't be verified by email client === I have a **MailComposer** that builds a mime message and digitally signs the body part (content) using a **MailSigningService**. Signing is implemented in the *sign()* and *buildSignedGenerator()* methods. After receiving the mail, the mail client detects a signature but complains that the mail may have been tampered. The mail client is able to show the certificate, it shows all certificates (incl the CA). So, either the signing implementation based on Bouncycastle is not done properly or the message itself is not built as it should be. Any hints what could go wrong here? MailComposer.java private MimeMessage buildMimeMessage(com.jumio.jump.domain.Message message, String[] recipients, String subject, Session session) throws MessagingException, IOException { MimeMultipart parts = buildContentParts(message); parts = (message.getSendOnBehalfOfDomain() != null) ? signContentParts(message, parts) : parts; return buildMimeMessage(message, recipients, subject, session, parts); } private MimeMessage buildMimeMessage(com.jumio.jump.domain.Message message, String[] recipients, String subject, Session session, MimeMultipart parts) throws MessagingException { MimeMessage mimeMessage = new MimeMessage(session); mimeMessage.setSubject(subject, "UTF-8"); mimeMessage.setHeader("Content-ParamType", "text/html; charset=UTF-8"); mimeMessage.setSentDate(new Date()); mimeMessage.setFrom(buildFromEmailAddress(message)); for (String recipient : recipients) { if (recipient == null) { continue; } InternetAddress addressTo = new InternetAddress(recipient); mimeMessage.addRecipient(Message.RecipientType.TO, addressTo); } mimeMessage.setContent(parts); return mimeMessage; } private MimeMultipart signContentParts(com.jumio.jump.domain.Message message, MimeMultipart contentParts) throws MessagingException { MimeBodyPart body = new MimeBodyPart(); body.setContent(contentParts); MimeMultipart result; try { result = mailSigningService.sign(body, signerCertificate, certificateChain, privateKey); } catch (Exception e) { logger.error(String.format("Error signing message $s, sending unsigned", message), e); return contentParts; } return result; } MailSigningService.java @Override public MimeMultipart sign(MimeBodyPart mimeBodyPart, X509Certificate signerCertificate, Certificate[] caCertificateChain, PrivateKey privateKey) throws SMIMEException, OperatorCreationException, CertificateEncodingException, NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException { Validate.notNull(signerCertificate, "Valid certificate required, check keystore and/or keystore " + "configuration"); Validate.notNull(privateKey, "Valid private key required, check keystore and/or keystore configuration"); SMIMESignedGenerator generator = buildSignedGenerator(signerCertificate, caCertificateChain, privateKey); return generator.generate(mimeBodyPart); } private SMIMESignedGenerator buildSignedGenerator(X509Certificate signerCertificate, Certificate[] caCertificateChain, PrivateKey privateKey) throws OperatorCreationException, CertificateEncodingException, NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException { SMIMECapabilityVector capabilities = new SMIMECapabilityVector(); capabilities.addCapability(SMIMECapability.dES_EDE3_CBC); capabilities.addCapability(SMIMECapability.rC2_CBC, 128); capabilities.addCapability(SMIMECapability.dES_CBC); ASN1EncodableVector attributes = new ASN1EncodableVector(); attributes.add(new SMIMEEncryptionKeyPreferenceAttribute(new IssuerAndSerialNumber(new X509Name( signerCertificate.getIssuerDN().getName()), signerCertificate.getSerialNumber()))); attributes.add(new SMIMECapabilitiesAttribute(capabilities)); SMIMESignedGenerator generator = new SMIMESignedGenerator(); generator.addSignerInfoGenerator(new JcaSimpleSignerInfoGeneratorBuilder().setProvider(SECURITY_PROVIDER_NAME) .setSignedAttributeGenerator(new AttributeTable(attributes)).build(SIGNER_ALGORITHM, privateKey, signerCertificate)); List<Certificate> certificates=new ArrayList<Certificate>(); if (caCertificateChain !=null && caCertificateChain.length>0) { certificates.addAll(Arrays.asList(caCertificateChain)); } else { certificates.add(signerCertificate); } Store certificateStore = new JcaCertStore(certificates); generator.addCertificates(certificateStore); return generator; }
0
[ 2, 8517, 908, 29, 5963, 14386, 16736, 92, 22, 38, 44, 23334, 34, 8517, 6819, 800, 3726, 3726, 31, 57, 21, 13, 1409, 8079, 29058, 1409, 30, 1895, 18, 21, 26193, 2802, 17, 21253, 4832, 14, 358, 141, 13, 5, 25424, 6, 568, 21, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
a function to load xts data into r === I'm trying to write a function that will load some xts data into r, and sort them by the date/time i specify. Maybe I'm trying a too simplistic method, but here is my code: load.data <- function (x, time1, time2) #x is going to be the actual file name { vector = get(load("C:/Users/username/Desktop/x")) sortvector = vector['time1/time2/'] return (sortvector) } And when i execute it, I get the message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file 'C:/Users/username/Desktop/x', probable reason 'No such file or directory' So, how can I make it so that my function will actually search for the file name, rather than actual generic 'x'? I hope I was clear, and I would certainly appreciate any help greatly. Thanks!
0
[ 2, 21, 1990, 20, 6305, 993, 38, 18, 1054, 77, 761, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 1990, 30, 129, 6305, 109, 993, 38, 18, 1054, 77, 761, 15, 17, 2058, 105, 34, 14, 1231, 118, 891, 31, 19077, 9, 913, 31, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Insert into SQLite === I am trying to insert text messages from inbox to SQLite Database but due to some special characters/ symbols it doesn't insert properly... I did go through some question in Stackoverflow but nothing seems useful... I got this from a code but that too is not working.. data.execSQL("INSERT INTO recor(text) VALUES('"+DatabaseUtils.sqlEscapeString(messag)+"')"); my database has only one field in it and am trying to insert details of messages along with it..am getting deatils (type,time,number,message) to a single string 'message' and 'recor' is my table name.
0
[ 2, 14692, 77, 4444, 10601, 800, 3726, 3726, 31, 589, 749, 20, 14692, 1854, 7561, 37, 19, 5309, 20, 4444, 10601, 6018, 47, 397, 20, 109, 621, 1766, 118, 9794, 32, 1437, 22, 38, 14692, 7428, 9, 9, 9, 31, 144, 162, 120, 109, 1301, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
findViewById returning null in fragment === I am replacing the existing fragment with new fragment and i am able to see my view but while setting on click listener on the button it returns null . I get the following exception : ?:??: W/?(?): java.lang.NullPointerException ?:??: W/?(?): at com.biggu.shopsavvy.fragments.xxxxxxxx.onCreateView(xxxxxx.java:34) ?:??: W/?(?): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:870) ?:??: W/?(?): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1080) ?:??: W/?(?): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:622) ?:??: W/?(?): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1416) ?:??: W/?(?): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:420) ?:??: W/?(?): at android.os.Handler.handleCallback(Handler.java:615) ?:??: W/?(?): at android.os.Handler.dispatchMessage(Handler.java:92) ?:??: W/?(?): at android.os.Looper.loop(Looper.java:137) ?:??: W/?(?): at android.app.ActivityThread.main(ActivityThread.java:4745) ?:??: W/?(?): at java.lang.reflect.Method.invokeNative(Native Method) ?:??: W/?(?): at java.lang.reflect.Method.invoke(Method.java:511) ?:??: W/?(?): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) ?:??: W/?(?): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) ?:??: W/?(?): at dalvik.system.NativeStart.main(Native Method) I have no clue what is happening ? Thanks in advance for your help
0
[ 2, 477, 4725, 779, 1340, 2485, 16203, 19, 14847, 800, 3726, 3726, 31, 589, 5496, 14, 3149, 14847, 29, 78, 14847, 17, 31, 589, 777, 20, 196, 51, 1418, 47, 133, 2697, 27, 10840, 21772, 27, 14, 5167, 32, 4815, 16203, 13, 9, 31, 164...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Column names after lapply === I have dataset filled like this: tickers <- c("SPY","DIA") l_ply(tickers, function(sym) try(getSymbols(sym, from="2012-03-01", to=Sys.Date()))) `ClosePrices <- do.call(merge, lapply(tickers, function(x) Cl(get(x))))` tail(ClosePrices) SPY.Close DIA.Close 2012-06-29 136.10 128.45 2012-07-02 136.51 128.36 and rsipx <- do.call(merge, lapply(ClosePrices, FUN=function(ClosePrices) RSI(ClosePrices))) tail(rsipx) SPY.Close DIA.Close 2012-06-29 58.36391 58.92043 2012-07-02 59.37153 58.53483 The problem I can't solve is when I apply a function which generates multiple columns for each input. In this case ADX produces 4 values (DIp DIn DX ADX) : adxpx <- do.call(merge, lapply(tickers, FUN=function(tickers) ADX(get(tickers)))) tail(adxpx) DIp DIn DX ADX DIp.1 DIn.1 DX.1 ADX.1 2012-06-29 53.47713 35.90631 19.65780 15.30299 55.14765 36.05527 20.93395 18.20818 2012-07-02 55.79485 32.58420 26.26262 16.08582 56.67699 33.08770 26.27903 18.78467 How can I get the corresponding column names instead of a number? (DX.DIA instead of DX.1) , or select only the $ADX named columns ?
0
[ 2, 4698, 1817, 75, 2630, 306, 102, 800, 3726, 3726, 31, 57, 1054, 3554, 1943, 101, 48, 45, 8809, 445, 13, 1, 8, 272, 5, 7, 18, 6448, 7, 15, 7, 4286, 7, 6, 644, 1, 306, 102, 5, 1786, 10500, 15, 1990, 5, 7261, 6, 1131, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Save Canvas image (Post the data string to PHP) === I'm looking to learn Javascript and have been wanting to for a while, I got a little tutorial on how to create a HTML5 Canvas drawing application, I'm trying to modify it so I can save the image to my MySQL database. So far, the code below simply redirects to my PHP file and does have the code I'd like, but it's a little big so I was wondering if there was a way to reduce that or possibly even _POST it to the PHP script. saveAsPNG : function(oCanvas, bReturnImg, iWidth, iHeight) { if (!bHasDataURL) { return false; } var oScaledCanvas = scaleCanvas(oCanvas, iWidth, iHeight); var strData = oScaledCanvas.toDataURL("image/png"); window.location.href = "http://localhost/save_server/?image=" + strData; if (bReturnImg) { return makeImageObject(strData); } else { saveFile(strData.replace("image/png", strDownloadMime)); } return true; }, I'm using window.location.href to send the data. Any help would be appreciated. The URL which it currently gives is... localhost/save_server/?image=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4EAAAIUCAYAAACkdimIAAAgAElEQVR4Xu3XQQEAAAgCMelf2iA3GzD8sHMECBAgQIAAAQIECB... You know what? It is so big, I'm not even going to post it here. Thanks for any help in advance!
0
[ 2, 2079, 9696, 1961, 13, 5, 6962, 14, 1054, 3724, 20, 13, 26120, 6, 800, 3726, 3726, 31, 22, 79, 699, 20, 2484, 8247, 8741, 17, 57, 74, 4638, 20, 26, 21, 133, 15, 31, 330, 21, 265, 29724, 27, 184, 20, 1600, 21, 13, 15895, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
scan-array CUDA === I'm trying to scan a simple array using CUDA but it seems there is something wrong with the code below..I am trying to find what i am doing wrong but i can't.Can anyone please help me? #include <stdio.h> #include <stdlib.h> __global__ void prescan(int *g_odata, int *g_idata, int n){ extern __shared__ int temp[];// allocated on invocation int thid = threadIdx.x; int offset = 1; temp[2*thid] = g_idata[2*thid]; // load input into shared memory temp[2*thid+1] = g_idata[2*thid+1]; for (int d = n>>1; d > 0; d >>= 1){ // build sum in place up the tree __syncthreads(); if (thid < d){ int ai = offset*(2*thid+1)-1; int bi = offset*(2*thid+2)-1; temp[bi] += temp[ai]; } offset *= 2; } if (thid == 0) { temp[n - 1] = 0; } // clear the last element for (int d = 1; d < n; d *= 2){ // traverse down tree & build scan offset >>= 1; __syncthreads(); if (thid < d){ int ai = offset*(2*thid+1)-1; int bi = offset*(2*thid+2)-1; int t = temp[ai]; temp[ai] = temp[bi]; temp[bi] += t; } } __syncthreads(); g_odata[2*thid] = temp[2*thid]; // write results to device memory g_odata[2*thid+1] = temp[2*thid+1]; } int main(int argc, char *argv[]){ int i; int *input = 0; int *output = 0; int *g_idata = 0; int *g_odata = 0; int numblocks = 1; int radix = 16; input = (int*)malloc(numblocks*radix*sizeof(int)); output = (int*)malloc(numblocks*radix*sizeof(int)); cudaMalloc((void**)&g_idata, numblocks*radix*sizeof(int)); cudaMalloc((void**)&g_odata, numblocks*radix*sizeof(int)); for(i=0; i<numblocks*radix; i++){ input[i] = 1 + 2*i; } for(i=0; i<numblocks*radix; i++){ printf("%d ", input[i]); } cudaMemcpy(g_idata, input, numblocks*radix*sizeof(int), cudaMemcpyHostToDevice); prescan<<<1,8>>>(g_odata, g_idata, numblocks*radix); cudaThreadSynchronize(); cudaMemcpy(output, g_odata, numblocks*radix*sizeof(int), cudaMemcpyDeviceToHost); for(i=0; i<numblocks*radix; i++){ printf("%d ", output[i]); } free(input); free(output); cudaFree(g_idata); cudaFree(g_odata); return 0; } The output is this: 1 3 5 7 9 11 13 15 17 .... 31 0 0 .... 0
0
[ 2, 8313, 8, 8576, 93, 272, 5729, 800, 3726, 3726, 31, 22, 79, 749, 20, 8313, 21, 1935, 7718, 568, 272, 5729, 47, 32, 2206, 80, 25, 301, 1389, 29, 14, 1797, 1021, 9, 9, 49, 589, 749, 20, 477, 98, 31, 589, 845, 1389, 47, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Port an IOS animation to Android === I am porting an IOS app to Android. The IOS has an interactive video driven by an xml file (part of which are shown below). I would appreciate (1) links on IOS documentation for this kind of framework or (2) doc that explains the structure of this xml file and (3) any hints on how to port this an Android type activity. <?xml version="1.0" encoding="UTF-8" ?> <config> <audio_base>audio/</audio_base> <video_base>videos/</video_base> <image_base>/images/</image_base> <properties> <default_background>base-outline</default_background> <intro_video>full-video-home</intro_video> <bg_loop>demo-loop</bg_loop> <default_animation_time>.25</default_animation_time> </properties> <demo_items> <item id="1" timeout="999999" desc="Intro" set_background="base-intro"> <audio></audio> <instruction_text top="-70" left="50"><![CDATA[]]></instruction_text> <screen_notes><![CDATA[Green button glows]]></screen_notes> <new_text2 top="60" left="251" color="#fe1e1e"><![CDATA[Use your finger to <br>follow the directions. <br>Press the green on/off <br>button to begin.]]></new_text2> <new_text3 top="160" left="251" color="#fe1e1e"><![CDATA[Or get in touch with a <br>representative today.]]></new_text3> <interaction>button</interaction> <assets> <button_image src="button-power-on" over_src="button-power-off" top="-15" left="-205" animate_to_duration="1000" /> </assets> </item> <item id="2" timeout="8000" desc="Demo animates in" set_background="base-intro"> <audio></audio> <instruction_text top="10" left="15"><![CDATA[]]></instruction_text> <screen_notes><![CDATA[Equipment animates large then to lower left; outline of man fades in]]></screen_notes> <interaction>video</interaction> <assets> <video_overlay src="device_animation" top="5" left="0" width="480" height="260" /> </assets> </item>
0
[ 2, 184, 20, 1295, 40, 13, 7760, 6236, 20, 13005, 800, 3726, 3726, 31, 589, 1295, 68, 40, 13, 7760, 4865, 20, 13005, 9, 14, 13, 7760, 63, 40, 9194, 763, 5355, 34, 40, 23504, 3893, 13, 5, 3091, 16, 56, 50, 1721, 1021, 6, 9, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Transitioning Spring MVC-based Web UI === I am currently working on a (Java EE, Spring MVC, Web, Sitemesh, XHTML, CSS, jQuery) project where the current UI will have to be gradually replaced by another UI, which includes substantial look & feel and IxD changes. Also, the current UI project is completely decoupled (separate WAR) from the back-end projects via MOM. The crucial point is that the business guys want that transition to be done on a "Frankenstein" fashion, where features from the old UI would have to be present in the new UI while the new features are implemented. What would be the best approach to this transition? I can think of the options below, but am unsure on which path will be the best. - <b>Single Project:</b> Start off of a copy of the current UI project (branch) and maintain 2 separate file structures to segregate artifacts from the soon-to-be-old version. - <b>Two Projects: </b> Create a brand new project for the new UI and use portlets or mashups to integrate the existing features from the current UI into it. - <b>Single Messy Project: </b> Add the new elements to the current project as we go. This sounds crazy to me, since the extra "glue" will have to be added to support the transition phase will most likely fester the new UI's elements forever.
0
[ 2, 4513, 68, 1573, 307, 8990, 8, 1281, 2741, 13, 5661, 800, 3726, 3726, 31, 589, 871, 638, 27, 21, 13, 5, 1004, 1385, 13, 2851, 15, 1573, 307, 8990, 15, 2741, 15, 689, 79, 6134, 15, 993, 15895, 15, 272, 18, 18, 15, 487, 8190, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
what is the best way to load content to speed up chrome extension? === currenly I've this: http://jsfiddle.net/LUgRF/ As you can see there are 5 buttons at the top, and when you hover them, beneath the buttons shows up a content window. The problem is that every 'content window' is loaded when you load the page. When there is a lot of content in it, loading can take a while. Because this is for a chrome extension, chrome waits until everything is loaded before opening the extension bubble. How to prevent the long load time? I've tried to load the content using innerHTML after window is loaded (window.onload). But that still slows down the extension.
0
[ 2, 98, 25, 14, 246, 161, 20, 6305, 2331, 20, 1362, 71, 13, 12985, 3896, 60, 800, 3726, 3726, 5087, 2789, 102, 31, 22, 195, 48, 45, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 2377, 263, 8291, 118, 28, 42, 92, 196, 80, 50, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Reference to the current tab in storyboard UITabBarController === I added the following code in my AppDelegate application didFinishLaunchingWithOptions to make reference to the UITabBarController I've created in storyboard (like the Tabbed Application template). Then I want self.currentController reprecent the _current_ tab (ViewController). I can make it reprecent one of the tabs like this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UITabBarController *tabController = (UITabBarController *)self.window.rootViewController; self.currentController = [[tabController viewControllers] objectAtIndex:0]; } But how to make it reprecent the _currently dislplayed_ tab?
0
[ 2, 2801, 20, 14, 866, 6523, 19, 609, 2806, 13, 11193, 13100, 139, 12898, 1252, 800, 3726, 3726, 31, 905, 14, 249, 1797, 19, 51, 4865, 24249, 3322, 3010, 144, 23858, 18494, 68, 1410, 25458, 4710, 20, 233, 2801, 20, 14, 13, 11193, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Access child in customized wxPanel === So I have a class MyPanel inherited from wxPanel: class MyPanel : public wxPanel { public: MyPanel(wxWindow* parent) : wxPanel(parent){} void OnMouseMove(wxMouseEvent& event); private: DECLAER_EVENT_TABLE() }; and another main wxframe defined below: class mainFrame : public wxFrame { ... private: ... MyPanel* myPanel; ... wxStaticText* StaticText1; ... }; StaticText1 eventually will be assigned as the child of myPanel. So I want to update mouse cursor's coordinates in the method OnMouseMove() I am wondering how I can access to StaticText1 and update stuff.
0
[ 2, 1381, 850, 19, 28779, 619, 396, 3206, 532, 800, 3726, 3726, 86, 31, 57, 21, 718, 51, 3206, 532, 7179, 37, 619, 396, 3206, 532, 45, 718, 51, 3206, 532, 13, 45, 317, 619, 396, 3206, 532, 13, 1, 317, 45, 51, 3206, 532, 5, 49...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to refresh listview by hitting back button - Android === I have a ListView that is dynamic and will constantly change. The user selects an item and goes to a different activity. What I want: *When they hit back button and return to the ListView, I would like to call a certain action to refresh ListView* (in my case an AsyncTask). I have figured out one way to do this: By adding my refreshing code in onResume. But I find it refreshes a little too much -- I only want it to refresh when coming from the forward activities.
0
[ 2, 184, 20, 24905, 968, 4725, 34, 6687, 97, 5167, 13, 8, 13005, 800, 3726, 3726, 31, 57, 21, 968, 4725, 30, 25, 7782, 17, 129, 7545, 753, 9, 14, 4155, 5407, 18, 40, 9101, 17, 1852, 20, 21, 421, 2358, 9, 98, 31, 259, 45, 1637...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why are there two @interfaces for view controllers? === I'm learning some Objective-C, specifically iOS-related stuff. Whenever I generate a new `UIViewController`, or `UITableViewController`, etc, both the generated `.h` and `.m` files contain an `@interface`. The application will continue to compile if I delete the `@interface` from the `.m` file, also. What is the purpose of this `@interface` in the `.m` file?
0
[ 2, 483, 50, 80, 81, 13, 1, 6280, 6413, 18, 26, 1418, 9919, 18, 60, 800, 3726, 3726, 31, 22, 79, 2477, 109, 7038, 8, 150, 15, 3524, 13, 7760, 8, 6203, 3217, 9, 6634, 31, 7920, 21, 78, 13, 1, 5661, 4725, 12898, 1252, 1, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery Custom Click Event for altkey disabled === I'd like to update (or to custom) the JQUERY CLICK EVENT when I "altClick" on an element... something like this... BUT without the condition in the "click": In the HTML : the JS code $('#myElement').on({ 'altclick':function(e){ console.log('myElement - altclick'); }, 'click':function(e){ if(e.altKey === false && e.metaKey === false && e.shiftKey === false && e.ctrlKey === false){ console.log('myElement - click'); } } }); My custom altclick event : (function($){ $.event.special.altclick = { setup: function() { $(window).on('mousedown',altclick_handler); }, teardown: function() { $(window).off('mousedown',altclick_handler); } }; //------------------------------------------------------- function altclick_handler(e){ if(e.altKey){ $(e.target).triggerHandler('altclick'); } }; //------------------------------------------------------- $.fn.altclick = function(f){ return this.each(function(){ $(this).on('mousedown',function(e){ if(e.altKey === true){ f(); } }); }); }; //------------------------------------------------------- })(jQuery); THX for your help !!!!!
0
[ 2, 487, 8190, 93, 5816, 10840, 807, 26, 7051, 4237, 10154, 800, 3726, 3726, 31, 22, 43, 101, 20, 11100, 13, 5, 248, 20, 5816, 6, 14, 487, 8190, 93, 10840, 807, 76, 31, 13, 7, 192, 6668, 10129, 7, 27, 40, 4520, 9, 9, 9, 301, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# sample code authenticating to GitHub with GitHub API === Give me a sample code accessing to GitHub using GitHub API(with OAuth or any other method). Thank you.
1
[ 2, 272, 5910, 5717, 1797, 14351, 1880, 20, 13, 10404, 20926, 29, 13, 10404, 20926, 21, 2159, 800, 3726, 3726, 590, 55, 21, 5717, 1797, 1381, 68, 20, 13, 10404, 20926, 568, 13, 10404, 20926, 21, 2159, 5, 1410, 635, 1346, 96, 54, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Avoid that the gallery saves the picture taken with the camera in Android === I have an application that allows the user to take a picture with the native camera of the phone, I don't want to implement all the functionality of a camera (I don't want to loose the autofocus, flash or some other properties that the native camera might have) so I make this call: File folder = new File(Environment.getExternalStorageDirectory(),"folder"); folder.mkdirs(); File nomedia = new File(folder,".nomedia"); try{ nomedia.createNewFile(); }catch (IOException e){ e.printStackTrace(); Log.e("error", e.getMessage()); } File file = new File(folder,"image.jpeg"); try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } imageUri = Uri.fromFile(file); if(imageUri != null){ Log.i(TAG, "imageUri: " + imageUri.getPath()); imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); } Then in a button I have the execution of the intent: startActivityForResult(imageIntent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); This works perfectly, it opens the camera, I receive the callback when I take the picture and if I look to the folder with the file explorer of the phone I can see the picture and also the ".nomedia" file that I created. The thing is that I don't want the camera to store this image in the gallery of the phone, because, somehow this is "magically" ;) added to the Gallery of Android and I thought with adding the ".nomedia" file and creating the picture in a separate folder the Gallery won't scan it. The idea is that the pictures are only for internal use of the app. Is there anyway of avoiding this? I really searched and try many different ways, but I cannot solve it. I hope I was clear with the explanation. Thanks in advance!
0
[ 2, 2658, 30, 14, 2246, 16815, 14, 2151, 658, 29, 14, 3336, 19, 13005, 800, 3726, 3726, 31, 57, 40, 3010, 30, 2965, 14, 4155, 20, 247, 21, 2151, 29, 14, 1275, 3336, 16, 14, 1132, 15, 31, 221, 22, 38, 259, 20, 8713, 65, 14, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Symfony2 Composer Not Downloading Packages === I was recently trying to re-install the fos:userbundle and noticed the docs have changed. They are no longer using the deps file are now referencing the new package manager composer. I found some info about integrating composer with sf2.0.* here: http://knplabs.com/blog/symfony2-with-composer After downloading the src: https://github.com/KnpLabs/symfony-with-composer I tried adding the following to my composer.json: `"friendsofsymfony/user-bundle": "*"` as per the instructions: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md When I run `bin/vendors update` I get the following: Updating dependencies Nothing to install or update Writing lock file Generating autoload files It does not appear to be installing the fos package. Am I missing something? Thanks
0
[ 2, 13, 7261, 10229, 93, 135, 3039, 52, 7121, 68, 16875, 800, 3726, 3726, 31, 23, 1989, 749, 20, 302, 8, 108, 21300, 14, 4310, 18, 45, 16704, 9930, 413, 17, 2711, 14, 9765, 18, 57, 1015, 9, 59, 50, 90, 1045, 568, 14, 121, 1919,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to show a video when the app loads first time? === How can I make an app play a video walkthrough (only) the first time it is loaded and then close itself and not play the next time user uses the app? I found some instructions on showing a pop-up message but this didn't help really :/
0
[ 2, 184, 20, 298, 21, 763, 76, 14, 4865, 19069, 64, 85, 60, 800, 3726, 3726, 184, 92, 31, 233, 40, 4865, 418, 21, 763, 1466, 11639, 13, 5, 4965, 6, 14, 64, 85, 32, 25, 8572, 17, 94, 543, 1145, 17, 52, 418, 14, 328, 85, 4155...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adding delimeters and removing commas === I have a file which I've out-put several columns of information, 4 to be exact. At this moment they are separated by commas, but in order for my buddy to feed them into another script he wants the format to be with '|' as delimiter, and the commas removed, the commas follow every set of data, so after my script it outputs this: [0], [1], [2], [3] what I need is : [0] | [1] | [2] | [3]
0
[ 2, 4721, 1506, 49, 7307, 18, 17, 9096, 11951, 472, 800, 3726, 3726, 31, 57, 21, 3893, 56, 31, 22, 195, 70, 8, 4881, 238, 7498, 16, 676, 15, 268, 20, 44, 5340, 9, 35, 48, 688, 59, 50, 4196, 34, 11951, 472, 15, 47, 19, 389, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Serving Juggernaut 2 over pure HTTPS connection === I have a Ruby on Rails website at which I force all connections to be SSL. I need all connections from that site to use HTTPS as well. Also, Google Chrome will automatically switch to HTTPS even if I connect to another port. This means that I cannot connect to http://www.mysite.com:8080 I have to serve the juggernaut js file over https. But that doesn't work since Juggernaut doesn't want to use https instead of http at its internal webserver. So I copied the application.js file from the juggernaut folder /usr/local/lib/node_modules/juggernaut/public/application.js into my rails folder public/juggernaut and changed the following line in my HTML code: <script src="http://www.mysite.com:8080/application.js" type="text/javascript" charset="utf-8"></script> to <script src="https://www.mysite.com/juggernaut/application.js" type="text/javascript" charset="utf-8"></script> Now I seem to be able to at least initiate a Juggernaut object. The problem arises when I start to actually do some listening. I get this error: Not found: https://www.mysite.com:8080/socket.io/1/?t=1340749304426&jsonp=0 So either I need to a) be able to change it so I can actually have Juggernauts webserver use https instead of http. This is preferable. or b1) fix Juggernaut so it doesn't try to access socket.io over port 8080 and b2) add socket.io to my server, preferably under the www.mysite.com/juggernaut folder instead of the root. Any ideas? Thanks!
0
[ 2, 1799, 13032, 1674, 12716, 172, 84, 4267, 7775, 18, 2760, 800, 3726, 3726, 31, 57, 21, 10811, 27, 2240, 18, 2271, 35, 56, 31, 558, 65, 6760, 20, 44, 13, 18, 18, 255, 9, 31, 376, 65, 6760, 37, 30, 689, 20, 275, 7775, 18, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to send email with attachment from CentOS === I want to send email with attachment from CentOS. I tried 'mutt' and 'uuencode', neither of them works. for 'mutt', I run code echo "some message" | mutt -s "subject of the email" -a hello.txt xxx@gmail.com it shows error "Error sending message, child exited 78 ().Segmentation fault" for 'uuencode', I run sudo uuencode hello.txt hello.txt | mail xxx@gmail.com it shows "WARNING: RunAsUser for MSP ignored, check group ids (egid=500, want=51) can not chdir(/var/spool/clientmqueue/): Permission denied Program mode requires special privileges, e.g., root or TrustedUser. " and no react any more. Any suggestions? Thanks!
0
[ 2, 184, 20, 2660, 8517, 29, 14575, 37, 5802, 759, 800, 3726, 3726, 31, 259, 20, 2660, 8517, 29, 14575, 37, 5802, 759, 9, 31, 794, 13, 22, 7903, 38, 22, 17, 13, 22, 19612, 219, 9375, 22, 15, 3028, 16, 105, 693, 9, 26, 13, 22,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a limit to how often I can connect to my router with a wifi chip? === I made a device that connects to the internet using a Roving Networks Wifi Chip. I'm using a microcontroller that connects the chip to a voltage supply when I need to access a website (http), then download the information it needs, and finally shuts off the wifi chip by disconnecting the voltage source (using a transistor). The circuit is working fine...it connects to my webserver every couple hours. However, I'm thinking of upping my connection frequency to every couple minutes. Will my router be okay with this? The wifi chip connects via DHCP and acquires a lease from the router. I'm wondering if turning on, getting a new lease, and then turning off will cause the router to issue too many leases and if something will overflow? Do I need to do something to release the lease before cutting power? Or, are routers smart enough to release them automatically? Any suggestions would be really helpful!
0
[ 2, 25, 80, 21, 4496, 20, 184, 478, 31, 92, 6379, 20, 51, 858, 139, 29, 21, 4807, 1707, 7525, 60, 800, 3726, 3726, 31, 117, 21, 3646, 30, 8534, 20, 14, 2620, 568, 21, 13, 6937, 68, 5540, 4807, 1707, 7525, 9, 31, 22, 79, 568, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Google OAuth2 - How to save the user's effort to enter the username and password again? === I have read the flow of Google OAuth2 flow, but I don't know how to or what to store permanently so that next time or in the future, user doesn't need to input username or password in my app again. ---------- Here is my understanding: 0. Assuming the user just launched my app for the first time. 1. I produce a UIWebView in my app and load it with the Google OAuth2 request url (with all necessary parameters). 2. Google will then return me the login page and I display it in the UIWebView. 3. User input the username and password and tap "sign in" 4. Google will return the consent page in the UIWebView and ask user's approval. 5. User tap "permit" 6. Google will then return the "code" as the title of the returning page. 7. I get the "code", then ask for "token" for the following steps (Google Reader API calling, etc) ---------- Ok, I understand the above steps. But they are for the first time usage, right? - What then if the user launches my app for the 2nd and following times? - Should I store the "code" value in my app and if the user gets in my app again, I just begin from step 7? - What I should do to avoid the user to input their username and password again? Thanks
0
[ 2, 8144, 635, 1346, 96, 135, 13, 8, 184, 20, 2079, 14, 4155, 22, 18, 2150, 20, 2830, 14, 4155, 7259, 17, 20884, 188, 60, 800, 3726, 3726, 31, 57, 1302, 14, 3312, 16, 8144, 635, 1346, 96, 135, 3312, 15, 47, 31, 221, 22, 38, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting error while trying to mount linaro ubuntu binary to sd card :( === I am trying to work with Pandaboard for a project. I'm want to mount a binary of the Linaro Ubuntu 11.10 onto my SD card so that I can boot from it onto my PandaBoard So i issue the following commands > sudo linaro-media-create --mmc /dev/sdb1 --dev panda --hwpack > hwpack_linaro-lt-panda-x11-base_20111026-2_armel_supported.tar.gz > --binary linaro-o-ubuntu-desktop-tar-20111026-0.tar.gz and im getting the following errors. > proc umounted Error: Partition(s) on /dev/sdb1 are being used. > Traceback (most recent call last): File > "/usr/bin/linaro-media-create", line 183, in <module> > args.should_format_rootfs, args.should_align_boot_part) File "/usr/lib/pymodules/python2.6/linaro_image_tools/media_create/partitions.py", > line 149, in setup_partitions > should_align_boot_part=should_align_boot_part) File "/usr/lib/pymodules/python2.6/linaro_image_tools/media_create/partitions.py", > line 570, in create_partitions > proc.wait() File "/usr/lib/pymodules/python2.6/linaro_image_tools/cmd_runner.py", line > 100, in wait > raise SubcommandNonZeroReturnValue(self._my_args, returncode) linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub > process "['parted', '-s', '/dev/sdb1', 'mklabel', 'msdos']" returned a > non-zero value: 1 Please Help Me OUT!!
0
[ 2, 1017, 7019, 133, 749, 20, 2149, 6294, 7629, 287, 12968, 2473, 14171, 20, 13, 18, 43, 2056, 13, 45, 5, 800, 3726, 3726, 31, 589, 749, 20, 170, 29, 16982, 2806, 26, 21, 669, 9, 31, 22, 79, 259, 20, 2149, 21, 14171, 16, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
php sql server 2005 standard edition connection timeout === I've searched through endless solutions for connection problems with php and SQL Server 2005 and still no luck. I'm using SQL Server 2005 Standard Edition. Below is the code and output from the code after execution. Any thoughts would be much appreciated. <code> <?php $server = "MYLAP01\\SQLEXPRESS"; $options = array("Database" => "test1"); $conn = sqlsrv_connect($server, $options); if ($conn === false) die("<pre>".print_r(sqlsrv_errors(), true));echo "Successfully connected!"; sqlsrv_close($conn); ?> </code> <pre>Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => -1 [code] => -1 [2] => [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. [message] => [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Server Native Client 11.0]Login timeout expired [message] => [Microsoft][SQL Server Native Client 11.0]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => -1 [code] => -1 [2] => [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [message] => [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) )
0
[ 2, 13, 26120, 4444, 255, 8128, 812, 1236, 1322, 2760, 85, 1320, 800, 3726, 3726, 31, 22, 195, 9036, 120, 11340, 6776, 26, 2760, 1716, 29, 13, 26120, 17, 4444, 255, 8128, 812, 17, 174, 90, 5419, 9, 31, 22, 79, 568, 4444, 255, 812...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery add css style to link list dynamically === list of link. required when we click it changes its color i.e highlight active link... I can't use css as this page is not refreshing. Want to highlight current link. **HTML** <table border="0"> <tr style=" width: 100px;"> <td> <div class="overMe"> <a href="javascript:void(0);" class="leftList">link 1</a> </div> </td> </tr> <tr style=" width: 100px;"> <td> <div class="overMe"> <a href="javascript:void(0);" class="leftList">link 2</a> </div> </td> </tr> <tr style=" width: 100px;"> <td> <div class="overMe"> <a href="javascript:void(0);" class="leftList">link 3</a> </div> </td> </tr> </table> **​CSS** a { color: darkgreen; } .selected { color: red; } **jQuery Code** $(document).ready(function(){ $('.overMe a').click(function(){ $(this).addClass('selected'); $('.overMe a').siblings().removeClass('selected'); }); }) ​EXAMPLE : http://jsfiddle.net/TL9rh/
0
[ 2, 487, 8190, 93, 3547, 272, 18, 18, 1034, 20, 3508, 968, 7782, 1326, 800, 3726, 3726, 968, 16, 3508, 9, 1390, 76, 95, 10840, 32, 1693, 82, 1665, 31, 9, 62, 14373, 1348, 3508, 9, 9, 9, 31, 92, 22, 38, 275, 272, 18, 18, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP form code maintainance === I am working on a database in mysql and I need to make a user facing page that allows me to enter text for each field and then submit the record. I have been able to accomplish this easily, however it is getting quit annoying having to update the input.html and save.php every time I decide to add/remove a field. It really seems like there should be some sort of program that can auto-maintain the code for me and allow me to just focus on the database structure. Does anyone know of something that does this? I feel like I am doing it all wrong. Thanks in advance. P.S. I realize that I could just use phpmyadmin, but I do not want to give full DB access to my data entry people; plus they are not technical types, I don't want to intimidate them.
0
[ 2, 13, 26120, 505, 1797, 4027, 2416, 800, 3726, 3726, 31, 589, 638, 27, 21, 6018, 19, 51, 18, 22402, 17, 31, 376, 20, 233, 21, 4155, 4325, 2478, 30, 2965, 55, 20, 2830, 1854, 26, 206, 575, 17, 94, 12298, 14, 571, 9, 31, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pass JSON String into Jstree === I'm, Having trouble passing JSON data into the Jstree. Following is my Jstree $("#tree") .bind("open_node.jstree", function (event, data) { console.log(data.rslt.obj.attr("id")); }) .jstree({ "plugins" : ["themes", "json_data", "ui"], "json_data" : { "data": [{"data":'Top Level - ',"state":'closed',"attr":{"seq_no":341386}}], "state" : "open", "ajax": { "type": 'POST', "dataType": 'json', "data": {"action": 'getChildren'}, "url": function (node) { var nodeId = node.attr('seq_no'); return 'ajax/test.jsp?seq_no=' + 341386; }, "success": function (new_data) { return new_data; } } } }); And test.jsp looks like this: --------------------------- RecordCollection result=null; PlsqlSelectCommand selCmd = null; String sErrorMsg = ""; String sqlSelect; OutputFormat format = new OutputFormat( doc ); //Serialize DOM StringWriter xmlOut = new StringWriter(); //Writer will be a String XMLSerializer serial = new XMLSerializer( xmlOut, format ); serial.serialize(doc); JSONObject jsonObject = XML.toJSONObject(xmlOut.toString()); <%=jsonObject%> --------------------- The problem is JSON data isnt passed into the jstree. thus I cant set my children nodes. I've tried so hard but can't get this working. Is there something else I need to do in order to pass this JSON string into the jstree. My jstree works when the data feed is hard-coded. Any help is much appreciated.
0
[ 2, 1477, 487, 528, 3724, 77, 487, 18, 8101, 800, 3726, 3726, 31, 22, 79, 15, 452, 2572, 2848, 487, 528, 1054, 77, 14, 487, 18, 8101, 9, 249, 25, 51, 487, 18, 8101, 5579, 5, 7, 5910, 8101, 7, 6, 13, 9, 4772, 43, 5, 7, 10157...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Extjs 4 Panel inside a Panel: autoScroll not working === I have this view (DetailsContainer, first class in code section of this question) with two items inside (MetaDataPanel, Preview), but autoscroll doesn't work in MetaDataPanel (follow the code). So when I put some items inside MetaDataPanel, autoscroll doesn't work... Any suggests? Ext.define('DP.view.DetailsContainer' ,{ id: 'DetailsContainer', extend: 'Ext.Panel', alias : 'widget.DetailsContainer', collapsible: true, // margins:'5 0 5 5', split:true, layout: { type: 'accordion', align: 'stretch', pack : 'start' }, initComponent: function() { Ext.apply(this, { items: [{ xtype: 'MetaDataPanel', flex:1 },{ xtype: 'Preview', flex:2 }] }); this.callParent(arguments); } }); Ext.define('DP.view.MetaDataPanel' ,{ id: 'MetaDataPanel', extend: 'Ext.Panel', alias : 'widget.MetaDataPanel', title : 'MetaDati', layout: 'fit', autoScroll:true, //TODO: autoscroll not working initComponent: function() { Ext.apply(this, { items: [{ xtype: 'component' , html: 'Nessun File o Cartella selezionata. Selezionare un elemento per visualizzare i metadati!', margin: 5, style: { color: '#000000' } }] }); this.callParent(arguments); } });
0
[ 2, 1396, 38, 728, 18, 268, 4113, 572, 21, 4113, 45, 3108, 3862, 8694, 52, 638, 800, 3726, 3726, 31, 57, 48, 1418, 13, 5, 546, 8682, 18, 1126, 5851, 106, 15, 64, 718, 19, 1797, 1050, 16, 48, 1301, 6, 29, 81, 3755, 572, 13, 5,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ViewController Delegate === is it possible to access a ViewController's methods from the appDelegate, like it is possible inverse with the following code:? AppDelegate *ad = (AppDelegate *) [[UIApplication sharedApplication] delegate]; When I try ViewController *vc = (ViewController *) [[UIApplication sharedApplication] delegate]; I get an error... Thanks!
0
[ 2, 1418, 12898, 1252, 11300, 800, 3726, 3726, 25, 32, 938, 20, 1381, 21, 1418, 12898, 1252, 22, 18, 3195, 37, 14, 4865, 24249, 3322, 15, 101, 32, 25, 938, 19, 9453, 29, 14, 249, 1797, 45, 60, 4865, 24249, 3322, 1637, 1283, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hibernate `assigned` strategy returns 0 with sequence and trigger === I've Table uses Trigger and sequence to set its PK column. The Hibernate mapping strategy for its Pk is `assigned`.. This yields in `session.save(obj)` returns object with `id=0` How to make it returns the correct assigned PK value. `session.getIdentifier()` doesn't work!
0
[ 2, 4148, 2102, 8820, 13, 1, 472, 13472, 1, 4427, 4815, 713, 29, 4030, 17, 7286, 800, 3726, 3726, 31, 22, 195, 859, 2027, 7286, 17, 4030, 20, 309, 82, 13, 17244, 4698, 9, 14, 4148, 2102, 8820, 13305, 4427, 26, 82, 13, 17244, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Manually Connection between SQL Server and Model === I created a empty project in ASP.Net and then I manually add it view,controller and model. Now I want to connect SQL Server to Model class. How can I do it ? Please Help me.
0
[ 2, 23671, 2760, 128, 4444, 255, 8128, 17, 1061, 800, 3726, 3726, 31, 679, 21, 2424, 669, 19, 28, 306, 9, 2328, 17, 94, 31, 23671, 3547, 32, 1418, 15, 12898, 1252, 17, 1061, 9, 130, 31, 259, 20, 6379, 4444, 255, 8128, 20, 1061, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
How to make a download link go through proxy? PHP === I have a proxy (IP + Port) and a file located on a different server. I need people to download this file but through my proxy. The problem is, I don't want people to need to do stuff on there browser... How do I do that? Thanks! If you didn't understand something please ask.
0
[ 2, 184, 20, 233, 21, 7121, 3508, 162, 120, 27188, 60, 13, 26120, 800, 3726, 3726, 31, 57, 21, 27188, 13, 5, 4307, 2754, 1295, 6, 17, 21, 3893, 335, 27, 21, 421, 8128, 9, 31, 376, 148, 20, 7121, 48, 3893, 47, 120, 51, 27188, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sprit Sheets Vs array of PNG files for animations === I do lot of animations in my iOS app using UIImageView.animationImages by passing an array of UIImage objects to the method listed below for animation. Current my array of UIImage objects contains separate PNG files. I know I can do similar animations by using & passing a Sprite Sheet instead of passing an array of separate PNG files. What are the advantages of one over another or Sprite Sheets are meant for a different purpose? - (void) startImageViewAnimation:(UIImageView *)imageView WithImages:(NSArray*)imageArray orBuildArrayWithImage:(NSString *)imageName duration:(CGFloat)duration repeatCount:(NSInteger)repeatCount soundFile:(NSString *)soundFile stopSoundAfterDuration:(CGFloat) stopSoundDuration { if([imageName length] != 0) { NSMutableArray *array = [[NSMutableArray alloc] init]; UIImage *image; int index = 1; NSString *string; do { string = [NSString stringWithFormat:@"%@%02d.png", imageName, index++]; image = [UIImage imageNamed:string]; if(image) [array addObject:image]; } while (image != nil); imageView.animationImages = array; [array release]; } else { imageView.animationImages = imageArray; } imageView.animationDuration = duration; imageView.animationRepeatCount = repeatCount; [imageView startAnimating]; if([soundFile length] != 0) { [self loadSoundEffectAudio:soundFile]; } }
0
[ 2, 17465, 242, 8801, 4611, 7718, 16, 351, 2723, 6488, 26, 6236, 18, 800, 3726, 3726, 31, 107, 865, 16, 6236, 18, 19, 51, 13, 7760, 4865, 568, 13, 5661, 22039, 4725, 9, 3443, 79, 857, 22039, 18, 34, 2848, 40, 7718, 16, 13, 5661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sort records from types Rails === Hi im trying to sort output data without the controller in the layout, im using devise, formtastic and some other gems to make the login and user interface the problem is that i have 3 tables Products, Carted_products and Users, and i want to show the Carted_products by Product_id in the view, i got already it to show them by record in the table but i want it to SORT them example: I have 3 different orders, 2 of them have the same product_id, they have each: 1. Ammount 2. Product_id 3. User_id and i can acces the price via carted_product.product in the model asociation heres my view code: >%tbody >> - if user_signed_in? > - current_user.carted_products.each do |f| > - @total = @total + f.carted_product_price(f.ammount, f.product.price) > %tr > %td.carted_name > = f.product.name > %td.carted_ammount > = f.ammount > %td.carted_price > $ > = f.carted_product_price(f.ammount, f.product.price) carted_product_price just recieves the ammount and price of the product and returns the multiplied price so it prints all the rows in the table it doesnt matter if the different records are form the same product, i just want to join them in only one table row output
0
[ 2, 2058, 742, 37, 2551, 2240, 18, 800, 3726, 3726, 4148, 797, 749, 20, 2058, 5196, 1054, 366, 14, 9919, 19, 14, 9106, 15, 797, 568, 29276, 15, 505, 38, 9428, 17, 109, 89, 8551, 18, 20, 233, 14, 6738, 108, 17, 4155, 6573, 14, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python: extract Cyrillic string from EXIF === I am a complete beginner in Python, and would like to start learning it by doing. Namely, I'd love to correct some EXIF information in a huge bunch of family photos I have. To start with, I want to just get this information out of JPEG files properly. Some of them have a title written in EXIF. It can be obtained e.g. by import pyexiv2 metadata = pyexiv2.ImageMetadata(filename) metadata.read() title = metadata['Exif.Image.XPTitle'] This far I've got. Now comes the problem. Some of the titles contain Cyrillic letters. If I do `print title.human_value` I get for example `Милой Мамуле от Майи, 11 ÑÐ½Ð²Ð°Ñ€Ñ 1944.` while with `print title`, it is <Exif.Image.XPTitle [Byte] = 28 4 56 4 59 4 62 4 57 4 32 0 28 4 48 4 60 4 67 4 59 4 53 4 32 0 62 4 66 4 32 0 28 4 48 4 57 4 56 4 44 0 32 0 49 0 49 0 32 0 79 4 61 4 50 4 48 4 64 4 79 4 32 0 49 0 57 0 52 0 52 0 46 0 0 0> The actual string I'd love to see is Милой Мамуле от Майи, 11 января 1944. It seems to be a unicode problem, but after trying already a dozen of different methods found here and elsewhere, I just cannot cope with it. Is it possible to see Russian letters in the console at all? I am using python(xy) on Windows 7 (English), so my IDE is spyder2. Just the default installation, to which I added pyexiv2. TIA!
0
[ 2, 20059, 45, 10962, 18671, 3724, 37, 1396, 821, 800, 3726, 3726, 31, 589, 21, 1279, 26931, 19, 20059, 15, 17, 83, 101, 20, 799, 2477, 32, 34, 845, 9, 8525, 15, 31, 22, 43, 339, 20, 4456, 109, 1396, 821, 676, 19, 21, 2329, 765...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to pass a variable from a html form to a .js file? === Here is my code File external.js: var TRange=null; function findString (str) { if (parseInt(navigator.appVersion)<4) return; var strFound; if (window.find) { // CODE FOR BROWSERS THAT SUPPORT window.find strFound=self.find(str); if (!strFound) { strFound=self.find(str,0,1); while (self.find(str,0,1)) continue; } } else if (navigator.appName.indexOf("Microsoft")!=-1) { // EXPLORER-SPECIFIC CODE if (TRange!=null) { TRange.collapse(false); strFound=TRange.findText(str); if (strFound) TRange.select(); } if (TRange==null || strFound==0) { TRange=self.document.body.createTextRange(); strFound=TRange.findText(str); if (strFound) TRange.select(); } } else if (navigator.appName=="Opera") { alert ("Opera browsers not supported, sorry...") return; } if (!strFound) alert ("String '"+str+"' not found!") return; } File Search.html: <html> <head></head> <title>Search</title> <body> <form name="input" action = "external.js"> Search for: <input type="text" name="keytext" /><br /> </form> <p> You can search this text. Search the text again</p> </body> </html> I am looking for a method to modify the form part of the HTML file such that it can make a call to the external JavaScript (external.js) and pass the parameters. The parameter will be the text in the input box.
0
[ 2, 184, 20, 1477, 21, 7612, 37, 21, 13, 15895, 505, 20, 21, 13, 9, 728, 18, 3893, 60, 800, 3726, 3726, 235, 25, 51, 1797, 3893, 4886, 9, 728, 18, 45, 4033, 13, 38, 8366, 3726, 4215, 211, 73, 1990, 477, 11130, 13, 5, 9729, 6,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
QtPainter init painter and use it === I created a class called painter and created the QtPainter p in the constructor passing the QMainWindow as a parameter. So in the mainwindow.h i added: protected: void paintEvent(QPaintEvent *e); private: Ui::MainWindow *ui; //Created by the QT Painter* p; In the mainwindow.cpp i added MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { p=new Painter(this); } and void MainWindow::paintEvent(QPaintEvent *e){ p->render(this); } Painter.h #ifndef PAINTER_H #define PAINTER_H #include <QtCore> #include <QtGui> class Painter{ private: QPainter* painter; bool init; public: Painter(QMainWindow* m); ~Painter(); void render(QMainWindow* m); }; #endif // PAINTER_H and painter.cpp #include "painter.h" Painter::Painter(QMainWindow* m){ painter=new QPainter(m); //init=false; } void Painter::render(QMainWindow* m){ painter->drawLine(10, 3,123, 909); } It doesn't draw a thing. If i do void Painter::render(QMainWindow* m){ painer->begin(m); painter->drawLine(10, 3,123, 909); } It render the line and after 2-3 seconds it closes The only way to make it work is to do void Painter::render(QMainWindow* m){ QPainter p(m); p.drawLine(10, 3,123, 909); } But it seems stupid initialize the p on every frame, it works like that. There's a way to just initialize the screen one time or make the begin work? Thanks.
0
[ 2, 2593, 38, 20578, 106, 19, 242, 3810, 17, 275, 32, 800, 3726, 3726, 31, 679, 21, 718, 227, 3810, 17, 679, 14, 2593, 38, 20578, 106, 351, 19, 14, 6960, 248, 2848, 14, 2593, 6232, 27508, 28, 21, 18906, 9, 86, 19, 14, 407, 2750...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
pos absolute jquery validationengine v2.5.5 custom error messages not working === So apparently pos absolute has provided a method for you to display custom error messages with his jquery validation engine script but I can't get it to work. According to his documentation at http://posabsolute.github.com/jQuery-Validation-Engine/#options/custom_error_messages he provides an example for how to implement. For simplicity, I have implemented it as follows.. `$('#myform').validationEngine('attach', {'custom_error_messages' : {'#menubuttontext' : { 'required': { 'message': "This is a custom message." }}}} ); ` For the following form field... ` <form action="" name="myform" id="myform" method="post" > <input type="text" name="menubuttontext" id="menubuttontext" class="validate[required]" data-tooltip-options="{&quot;position&quot;:&quot;right&quot;}" value="" size="10" > <input type="submit" name="submit" value="submit" < / form > ` When submitting the above form I get the default message "This is a required field" instead of the custom message "This is a custom message" that I'm attempting to implement. Has anyone been able to get this to work? What am I doing wrong? Thanks in advance!
0
[ 2, 12928, 7070, 487, 8190, 93, 27999, 16847, 566, 135, 9, 264, 9, 264, 5816, 7019, 7561, 52, 638, 800, 3726, 3726, 86, 3083, 12928, 7070, 63, 1173, 21, 2109, 26, 42, 20, 3042, 5816, 7019, 7561, 29, 33, 487, 8190, 93, 27999, 1406, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NHibernate Session Management & Castle in a Windows Service === I have got a windows service which looks for a certain file and save it to the DB. I'm using the repository pattern and using Castle Windsor for DI. This is how I register the NHibernate ISession and my unit of work. container.Register( Component.For<ISession>().UsingFactoryMethod(() => NHibernateSessionManager.Instance.GetSession()).LifeStyle.Transient); container.Register( Component.For<INHibernateSessionManager>().Instance(NHibernateSessionManager.Instance).LifestyleSingleton()); container.Register( Component.For<IUnitOfWork<ISession>>().ImplementedBy<Data.Framework.Nhibernate.UnitOfWork.NHibernateUnitOfWork>().LifeStyle.Transient); container.Register(Component.For(typeof(IRepository<>)).ImplementedBy(typeof(NHibernateRepository<>)).LifeStyle.Transient); This does not work for me, as when it tried to resolve the repository it's complaining about a key added to the repository already. Can you please tell me how to do this properly? Thanks, -Mike
0
[ 2, 12109, 15191, 8820, 3723, 1097, 279, 1339, 19, 21, 1936, 365, 800, 3726, 3726, 31, 57, 330, 21, 1936, 365, 56, 1879, 26, 21, 1200, 3893, 17, 2079, 32, 20, 14, 13, 9007, 9, 31, 22, 79, 568, 14, 24869, 3732, 17, 568, 1339, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Multiplying preprocessor constants in Objective - C === Suppose I have the following preprocessor definition `#define MYNUMBER 10f;` I would then like to use it in my code as follows: float someResult = MYNUMBER * 3; When I do this, Xcode thinks that I am trying to use `*` as a unary pointer mark instead of multiplication sign, and causes an error. What is the correct method of defining such a constant and using it in a multiplicative expression?
0
[ 2, 26314, 68, 782, 16835, 248, 3587, 18, 19, 7038, 13, 8, 272, 800, 3726, 3726, 5787, 31, 57, 14, 249, 782, 16835, 248, 5465, 13, 1, 5910, 546, 7509, 51, 16299, 332, 410, 73, 1, 31, 83, 94, 101, 20, 275, 32, 19, 51, 1797, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android: Sending an sms to same device via code? Or have to use reverse billing? === I wish to setup a telephone number confirming system within my app, pretty much like whatsapp does i.e. it sends you a PIN, it arrives on the android device and that proves you are the owner of the device (telephone number). Is this possible to fake an sms via code from myself to myself so that i cannot pickup the Pin, again via to code, without any intervention from the user? I looked at some Reverse billing systems, but i couldn't find any that worked in all countries and of course this requires that the receiver pays for the sms. What are my best options here? And how would this work via the emulator? I would really appreciate any feedback here. This is my first step :-) I would also like to do this in iOS as well. But thats in the future. Am i on the right track here? or should i be looking at an alternative solution or maybe reverse billing? Look forward to any help
0
[ 2, 13005, 45, 4907, 40, 7613, 18, 20, 205, 3646, 1197, 1797, 60, 54, 57, 20, 275, 7006, 1071, 68, 60, 800, 3726, 3726, 31, 2536, 20, 18161, 21, 5600, 234, 21472, 329, 363, 51, 4865, 15, 1772, 212, 101, 98, 18, 7753, 630, 31, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Shilft + Enter without inserting new line === I want to send textarea's data when user press shift + enter, but without inserting a new line. It doesn't work: $( 'form textarea' ).keydown(function (event) { if (event.keyCode == 13 && event.shiftKey) { send_data(); event.preventDefault(); return false; } }); I'm using Google Chrome.
0
[ 2, 3393, 9641, 38, 2754, 2830, 366, 14692, 68, 78, 293, 800, 3726, 3726, 31, 259, 20, 2660, 1854, 17760, 22, 18, 1054, 76, 4155, 901, 4471, 2754, 2830, 15, 47, 366, 14692, 68, 21, 78, 293, 9, 32, 1437, 22, 38, 170, 45, 5579, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...