unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
XSL questions: how can I select a set of nodes based on a set of node values? === New to XML/XSL/Xpath, and I've scoured these boards for an answer to a seemingly simple problem, but maybe I'm too new to XSL to understand some of the answers out there that might address this. I want to select a set of nodes that match a different set of node values stored elsewhere in the doc, so that: <body> <partlist> <part>head</part> <part>spleen</part> <part>toe</part> </partlist> <parts> <head>this is a head</head> <spleen>this is a spleen</spleen> <toe>big toe</toe> <toe>big toe</toe> <parts> </body> So that, let's say I want to count all the "parts", but I don't know the "parts" node names, I would want an XPath expr to match a set of nodes whose names are equal to the values of another set of nodes... I am new enough to XSL to both imagine that a solution is very simple, but experienced enough to realize that expecting a simple solution from XSL is a sure wrong path. In my procedural-based ignorance, this is what I have tried: <xsl:template match="/"> <xsl:apply-templates select="partlist/part"> <xsl:with-param name="parts" select="parts"/> </xsl:apply-templates> </xsl:template> <xsl:template match="part"> <xsl:param name="parts"/> <xsl:value-of select="count($parts[.])"/> </xsl:template> But this is completely wrong. Any help is much appreciated.
0
[ 2, 993, 18, 255, 2346, 45, 184, 92, 31, 5407, 21, 309, 16, 16272, 432, 27, 21, 309, 16, 15421, 4070, 60, 800, 3726, 3726, 78, 20, 23504, 118, 396, 18, 255, 118, 396, 8353, 15, 17, 31, 22, 195, 13, 18, 9598, 69, 158, 8755, 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...
Objective C Member reference base type ERRROR === I'm following the code from the Learning iOS Programming 2nd Edition book by Alasdair Allan page 91. I'm trying to make a table view output information to the text view. Everything else works before I add this code. The delegate.cities refers to a NSMutableArray called cities in the AppDelegate. I think is might have something to do with *objectAtIndex* expecting a *NSUInteger*, but the book says to send it *index.row*. *index* is of type *NSIndexPath* which is in my SimpleView class which I imported into this class. *row* is of type *NSInteger* so I'm assuming that the problem is that the book wants me to send *objectAtIndex* a signed integer when it is expecting an unsigned integer. Could that be he problem? If so, how do I fix it? Error message: Member reference base type 'char *(const char*,int)' is not a structure or union Here's my function: -(void)viewDidLoad { [super viewDidLoad]; AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; City *thisCity = [delegate.cities objectAtIndex:index.row]; //error with index.row self.title = thisCity.cityName; }
0
[ 2, 7038, 272, 322, 2801, 1000, 1001, 13, 106, 5932, 248, 800, 3726, 3726, 31, 22, 79, 249, 14, 1797, 37, 14, 2477, 13, 7760, 3143, 172, 706, 1322, 360, 34, 21, 4830, 43, 2642, 9243, 2478, 10228, 9, 31, 22, 79, 749, 20, 233, 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...
facebook sdk login crashes my android app === ok guys i really need your help.. i'm trying to create an android app that can connect to facebook no, i don't know why but at first i successfully managed to login to facebook using the sso they provide but after a while i got a weird problem whenever the facebook authorize method is called it opens the facebook login screen but before i can even see the login form it just crashes my app now, i would have post the logcat info but there's nothing in it that involves my app or facebook sdk...eve with a debug = true on the facebook sdk what i did so far is: <br> 1. tried to put an android private key to the app and link it to facebook instead use the debug key <br> 2. I linked the facebook source code to the app instead just the jar file (i don't know why i thought it would help) <br> 3. tried to open a new project to see if i defined something wrong...no help there.. 4. i use 2.2 android platform ohh..and i forgot to mention that it works on the emulator but not on the phones i think anything would help me at this point... thx :)
0
[ 2, 9090, 13, 18, 43, 197, 6738, 108, 21563, 51, 13005, 4865, 800, 3726, 3726, 5854, 2776, 31, 510, 376, 154, 448, 9, 9, 31, 22, 79, 749, 20, 1600, 40, 13005, 4865, 30, 92, 6379, 20, 9090, 90, 15, 31, 221, 22, 38, 143, 483, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 install mod_jk on Mac OS X === I am looking for a correct way to install mod_jk on Mac OS X 10.7 Lion or above. The goal is to test Tomcat behind Apache HTTPD. I've found so far the only way to install mod_jk is to download source then configure it in the console and make and make install. This is not very true because I will need to manage mod_jk installation and configuration myself. I for example can forget to delete mod_jk later when needed. Anyway I think there should be more friendly way to install mod_jk like some kind of DMG package. I also found that mod_jk is available in the OS X Server. Actually it's on my development machine, but available only for the server. <IfDefine MACOSXSERVER> ... #LoadModule jk_module libexec/apache2/mod_jk.so ... </IfDefine MACOSXSERVER> May be there is a package for mod_jk somewhere for developers who don't install OS X Server or any other way. Reference: 1. Install mod_jk on OS X - http://www.bartbusschots.ie/blog/?p=1347 Please suggest.
0
[ 2, 184, 20, 16146, 7226, 1, 16455, 27, 1572, 13, 759, 993, 800, 3726, 3726, 31, 589, 699, 26, 21, 4456, 161, 20, 16146, 7226, 1, 16455, 27, 1572, 13, 759, 993, 332, 9, 465, 6023, 54, 784, 9, 14, 1195, 25, 20, 1289, 2067, 5782,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Image noise reduction OCR === Hello i'm having problem with segmentation of the following picture below. It's coloured character which needs to be recognized. I'm using sharpening, wiener deblurring and wiener smoothing. After that i'm segmenting the picture with fuzzy-c means clustering (3-class). But in the case of letter E the best i get is without sharpenin,deblurring and smoothing, just with thresholded fcm segmentation. I should however get a better result than this, where i could combine those two parts as a whole (not just upper white part with the other half black). How could i solve this problem to be more robust and to work with other images also, for example the 5 in the picture? The outcome of 5 is with sharpening, debluring and smoothing, on top of fcm clustering. How could i make it more connected maybe? I would really appreciate any help i could get, please, oh and I'm doing this in matlab...so it would be nice to get any help from there, thank you! ![This is letter E, i would like to get one element as a whole][1] ![Second pic is number 5, should be more smooth and connected, without any spaces between lines][2] [1]: http://i.stack.imgur.com/jNkTH.png [2]: http://i.stack.imgur.com/PSRCc.jpg
0
[ 2, 1961, 3406, 5895, 13, 2499, 139, 800, 3726, 3726, 10975, 31, 22, 79, 452, 1448, 29, 5631, 857, 16, 14, 249, 2151, 1021, 9, 32, 22, 18, 16246, 925, 56, 2274, 20, 44, 2124, 9, 31, 22, 79, 568, 2641, 6286, 15, 26106, 12406, 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...
Header of html page adjusting a div to float left if chars are more for a field === I have a situation here as follows: <html lang="en"> <head> <meta charset="utf-8"> <title>My Header</title> <style> /* Global */ * { margin: 0; } html, body { height: 99%; margin-top:5px;margin-left:5px; margin-right:5px; } /* Header Menu*/ .task-bar{ width:80px; background-color:#fff; border:1px solid green; position: absolute; } .task-bar span{ color:#000; display:block; font-size:8pt; cursor:pointer; text-decoration:none; } .task-bar span:hover{ color:red; } /* Header */ .container{ min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -3em; width:100%; font-family:Segoe UI; color:#fff; } </style> <script type="text/javascript"> $(document).ready(function(){ $('.task-icon').click(function(){ $(".task-bar").slideToggle(); }); }); </script> </head> <body> <!-- Header Div --> <div class="container"> <table width="100%" style="background-color:#333030;"> <tr> <td> <div style="padding-top:15px;padding-left:20px;font-size:36px;">Header Header Header Header</div> </td> <td style="padding-top:10px;"> <div style="padding-left:10px;color:#FFFFFF;" id="userRole"> UserName<br/> <i>Role Role Role</i> </div> </td> <td> <div class="task-icon"><img src="profile.png"/></div> <div class="task-bar" style="display:none;"> <span id="">&nbsp;Change Role</span> <span id="">&nbsp;Profile</span> <span id="">&nbsp;Preferences</span> <span id="logout">&nbsp;Sign Out</span> </div> </td> </tr> </table> </div> </body> </html> I have to dynamically display the Username and role and it can be less characters and more too... so it is not adjusting the correct way i want... it should be close to profile.png but when the role/username is 20-25 characters den it gets far away or distorted. I want something to stick to profile.png and if it is more chars den it should float: left and stick to profile.png. Usernameeeeeeeeeeee - Profile.png Role - OR username - Profile.png Roleeeeeeeeeeeeeeeeeeee - Thanks in advance.
0
[ 2, 157, 106, 16, 13, 15895, 2478, 22209, 21, 13, 12916, 20, 11510, 225, 100, 4892, 18, 50, 91, 26, 21, 575, 800, 3726, 3726, 31, 57, 21, 1858, 235, 28, 2415, 45, 13, 1, 15895, 4544, 3726, 7, 219, 7, 1, 13, 1, 1743, 1, 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...
What is pull up and pull down resister in microcontroller === Why pull up and pull down resister is connected to the pin. how to configure pin as pull up and pull down or as interrupt souce.
1
[ 2, 98, 25, 2201, 71, 17, 2201, 125, 7983, 106, 19, 2899, 12898, 1252, 800, 3726, 3726, 483, 2201, 71, 17, 2201, 125, 7983, 106, 25, 2587, 20, 14, 3459, 9, 184, 20, 1065, 15951, 3459, 28, 2201, 71, 17, 2201, 125, 54, 28, 15811, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
AES decryption using pycrypto === As a self study exercise, I'm trying to learn how to use some of the pycrypto library. I need to decrypt a ciphertext string in CBC_MODE using AES. I the ciphertext, key, and IV are all given. Here is the code that I have written: from Crypto.Cipher import AES mode = AES.MODE_CBC key = "4ca00ff4c898d61e1edbf1800618fb28" ciphertext = "140b41b22a29beb4061bda66b6747e1428a226d160dad07883d04e008a7897ee2e4b7465d5290d0c0e6c6822236e1daafb94ffe0c5da05d9476be028ad7c1d81"; iv = ciphertext[:32] ciphertext = ciphertext[32:] decryptor = AES.new(key, mode, iv) plaintext = decryptor.decrypt(ciphertext) print plaintext When I run this, I get the following error: > ValueError: IV must be 16 bytes long I know that the IV string is 32 hex characters, and therefore 16 bytes. I think that this might be a typing problem, but I don't know how to correct it. Can anyone help? Thank you!
0
[ 2, 21, 160, 121, 11435, 872, 568, 7103, 11435, 111, 800, 3726, 3726, 28, 21, 1119, 949, 5935, 15, 31, 22, 79, 749, 20, 2484, 184, 20, 275, 109, 16, 14, 7103, 11435, 111, 1248, 9, 31, 376, 20, 121, 11435, 21, 23525, 11969, 3724, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 save Created Geo fence in MySQL using php and check the result? === I am referring following link http://stackoverflow.com/questions/8786120/how-to-create-a-geo-fence-and-save-the-area-from-google-map-using-php but i am unable to store created geo fence data in mySQl using php. I am to also checking for GPS reading coming in this save the data but to verify the fence of given data.
1
[ 2, 184, 20, 2079, 679, 6389, 6545, 19, 51, 18, 22402, 568, 13, 26120, 17, 2631, 14, 829, 60, 800, 3726, 3726, 31, 589, 7378, 249, 3508, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 3730, 3274, 12054, 118, 1544, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Create WCF application in a metro app === Is there any way to create a WCF service inside Visual Studio 2012 metro app solution file? When I try to add a new project, I don't see [WCF Service] template. Kindly help. Thanks in advance.
0
[ 2, 1600, 11801, 410, 3010, 19, 21, 3986, 4865, 800, 3726, 3726, 25, 80, 186, 161, 20, 1600, 21, 11801, 410, 365, 572, 3458, 1120, 563, 3986, 4865, 4295, 3893, 60, 76, 31, 1131, 20, 3547, 21, 78, 669, 15, 31, 221, 22, 38, 196, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0...
MVC 3 checklistbox === I'm novice in MVC and I have problem. One model: public partial class Flight { public int id_flight { get; set; } public int type_id { get; set; } public Nullable<int> kvs_id { get; set; } Second model: public partial class KVS { public KVS() { this.Flight = new HashSet<Flight>(); } public int id_kvs { get; set; } public string FIO { get; set; } public virtual ICollection<Flight> Flight { get; set; } } Method of controller FlightController return return View(flight.ToList()); There is view Index(), which outputs all Flights, in this view : @model IEnumerable<websubp.Models.Flight> I want to do filter-checkboxlist for Flight by KVS, where will be displayer only KVS.Fio for those Flight, which are in current view. Can you help me please?
0
[ 2, 307, 8990, 203, 2631, 5739, 5309, 800, 3726, 3726, 31, 22, 79, 21999, 19, 307, 8990, 17, 31, 57, 1448, 9, 53, 1061, 45, 317, 7284, 718, 1690, 13, 1, 317, 19, 38, 4924, 1, 14750, 13, 1, 164, 73, 309, 73, 13, 1, 317, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Xcode / Compiler Acting Up === I'm having some problems with Xcode. I was having some problems with a function that compared vectors to see if they were identical, I had it working, then I used it in another class, which was fine. I made some changes in that class, introduced some errors then cleaned them up. All of a sudden I have a string of errors which won't disappear. I've deleted the original function. I've deleted all references to it. I still get the error, just listed to the next point in the code file. I've quit Xcode multiple times, cleaned the build, ect. At some stage the build was failing with no error, but now the error is back again, with all the code still deleted. I foolishly don't have the actual code. Tried both LLVM and GCC/LLVM. Does anyone have any tips? Here is the full log; In file included from /vccheckout/tomascokis/PlanetScroller/Code/Raster/Objects/PropertyTable/PropertyTable.h:23: In file included from /vccheckout/tomascokis/PlanetScroller/Code/PlanetScroller/Scene/VisualObjects/PSPlanet.h:37: In file included from /vccheckout/tomascokis/PlanetScroller/Code/PlanetScroller/Scene/VisualObjects/PSPlanet.cpp:13: /vccheckout/tomascokis/PlanetScroller/Code/Raster/Services/DataFilterServices/DataFilterServices.h:42:27:{42:20-42:26}{42:30-42:36}: error: invalid operands to binary expression ('const PSPlanet::Segment' and 'const PSPlanet::Segment') [3] if( !( (*it1) == (*it2)) ) ~~~~~~ ^ ~~~~~~ /vccheckout/tomascokis/PlanetScroller/Code/PlanetScroller/Scene/VisualObjects/PSPlanet.cpp:35:25: note: in instantiation of function template specialization 'DataFilterServices::equateVector<std::vector<PSPlanet::Segment, std::allocator<PSPlanet::Segment> >, __gnu_cxx::__normal_iterator<const PSPlanet::Segment *, std::vector<PSPlanet::Segment, std::allocator<PSPlanet::Segment> > > >' requested here [3] DataFilterServices::equateVector(planet1->m_geometrySegments, planet2->m_geometrySegments, vector<PSPlanet::Segment>::const_iterator()), ^ /vccheckout/tomascokis/PlanetScroller/Libs/Code/Box2D/Common/b2Math.h:473:13: note: candidate function not viable: no known conversion from 'const PSPlanet::Segment' to 'const b2Vec2' for 1st argument [3] inline bool operator == (const b2Vec2& a, const b2Vec2& b) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_pair.h:96:5: note: candidate template ignored: failed template argument deduction [3] operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/postypes.h:198:5: note: candidate template ignored: failed template argument deduction [3] operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_iterator.h:282:5: note: candidate template ignored: failed template argument deduction [3] operator==(const reverse_iterator<_Iterator>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_iterator.h:332:5: note: candidate template ignored: failed template argument deduction [3] operator==(const reverse_iterator<_IteratorL>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/allocator.h:115:5: note: candidate template ignored: failed template argument deduction [3] operator==(const allocator<_T1>&, const allocator<_T2>&) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_vector.h:942:5: note: candidate template ignored: failed template argument deduction [3] operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_deque.h:243:5: note: candidate template ignored: failed template argument deduction [3] operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_deque.h:250:5: note: candidate template ignored: failed template argument deduction [3] operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_deque.h:1549:5: note: candidate template ignored: failed template argument deduction [3] operator==(const deque<_Tp, _Alloc>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_tree.h:299:5: note: candidate template ignored: failed template argument deduction [3] operator==(const _Rb_tree_iterator<_Val>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_tree.h:755:5: note: candidate template ignored: failed template argument deduction [3] operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_map.h:682:5: note: candidate template ignored: failed template argument deduction [3] operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_multimap.h:612:5: note: candidate template ignored: failed template argument deduction [3] operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_stack.h:214:5: note: candidate template ignored: failed template argument deduction [3] operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/basic_string.h:2151:5: note: candidate template ignored: failed template argument deduction [3] operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/basic_string.h:2163:5: note: candidate template ignored: failed template argument deduction [3] operator==(const _CharT* __lhs, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/basic_string.h:2175:5: note: candidate template ignored: failed template argument deduction [3] operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/streambuf_iterator.h:194:5: note: candidate template ignored: failed template argument deduction [3] operator==(const istreambuf_iterator<_CharT, _Traits>& __a, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stream_iterator.h:127:5: note: candidate template ignored: failed template argument deduction [3] operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_set.h:501:9: note: candidate template ignored: failed template argument deduction [3] operator== (const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); ^ /Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/bits/stl_multiset.h:507:5: note: candidate template ignored: failed template argument deduction [3] operator==(const multiset<_Key, _Compare, _Alloc>& __x,
0
[ 2, 993, 9375, 13, 118, 21486, 2180, 71, 800, 3726, 3726, 31, 22, 79, 452, 109, 1716, 29, 993, 9375, 9, 31, 23, 452, 109, 1716, 29, 21, 1990, 30, 2428, 7497, 18, 20, 196, 100, 59, 46, 6323, 15, 31, 41, 32, 638, 15, 94, 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...
Combox in datagridview in vb.net === I have datagridviw on with datagridvewicomobox which fill with product table. I want if i select apple form datagridvewicomoboxcombox its rate should appeared on next column of datagridview. Thanks Nandan
0
[ 2, 22621, 396, 19, 1054, 16375, 4725, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 31, 57, 1054, 16375, 1755, 499, 27, 29, 1054, 16375, 195, 3976, 960, 111, 5309, 56, 3509, 29, 2374, 859, 9, 31, 259, 100, 31, 5407, 4037, 505, 1054, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 do i overwrite the default Backbone Model? === I want to overwrite the default Backbone Model variable (Backbone.Model) to use my own custom validation methods (isValid, validate) and to add some properties. _.extend(Backbone.Model, { isValid: function() { // custom function }, validate: function() { // custom logic } }); var myModel = Backbone.Model.extend({ // this adds for example properties to my modified Backbone model. }); Unfortunatly this doesn't work... when I load the "wrapper, extending"-module with requirejs and create a new Model instance and than call validate. It says that it doesn't know any validate function...
0
[ 2, 184, 107, 31, 84, 23716, 14, 12838, 24036, 1061, 60, 800, 3726, 3726, 31, 259, 20, 84, 23716, 14, 12838, 24036, 1061, 7612, 13, 5, 1958, 8640, 9, 13998, 6, 20, 275, 51, 258, 5816, 27999, 3195, 13, 5, 403, 18506, 43, 15, 7394,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
401 Unauthorized error with Jquery post and MVC === I'm building an MVC application which uses Windows Authentication. I want to handle a dropdownlist change event by making a post to the server with Jquery post. Below is the Controller method I want to invoke: [HttpPost] public JsonResult UpdateConversion(int conversionId, int? conversionStandardId) { // Some statements here } And below is the javascript function that handles the onchange event of the dropdown: function onConversionValueChange() { var input = $(this); var conversionId = input.attr('id').replace('ConversionFor', ''); var selectedValue = input.val(); if (selectedValue == '') { $.post(Conversions._UpdateConversionURL, { conversionId: conversionId }, onConversionValueChanged); } else { $.post(Conversions._UpdateConversionURL, { conversionId: conversionId, conversionStandardId: selectedValue }, onConversionValueChanged); } } I don't think there's something wrong with these methods, because when I load the page initially and do the change the post call works several times. But after a while, it calls the post 3 times in a single event and returns 401 unauthorized error on all of them. Although the third call seemed to be successful. ![Post call error][1] Anyone can help me with this? Thanks. [1]: http://i.stack.imgur.com/jcRRH.png
0
[ 2, 13, 20658, 25881, 7019, 29, 487, 8190, 93, 678, 17, 307, 8990, 800, 3726, 3726, 31, 22, 79, 353, 40, 307, 8990, 3010, 56, 2027, 1936, 27963, 9, 31, 259, 20, 3053, 21, 2804, 2968, 5739, 753, 807, 34, 544, 21, 678, 20, 14, 81...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
XML Encoding for French and german characters === I'm trying to copy some text to xml file. The problem is that all special characters are converted to symbols.. I googled and tested tons of codes but no help so far I would like to copy a text file that contains the following line <data path="Procédures de support/Achat" name="Gestion dös achats et dés magasins" type="Main Process" /> however if i use encoding to text file, it works, but if i want to create xml then it doesn't Here is my code: string tempFile = Path.GetTempFileName(); using (var sr = new StreamReader(filePath,Encoding.Default)) // I also tested Encoding.UTF8 { XmlWriterSettings settings = new XmlWriterSettings(); settings.Encoding = Encoding.Default; using (XmlWriter writer = XmlWriter.Create(fileOutput,settings)) { writer.WriteStartDocument(false); writer.WriteStartElement(startRoot); string line; while ((line = sr.ReadLine()) != null) { writer.WriteRaw(line); } writer.WriteEndElement(); writer.WriteEndDocument(); } } Any idea?
0
[ 2, 23504, 19608, 26, 484, 17, 548, 1766, 800, 3726, 3726, 31, 22, 79, 749, 20, 4344, 109, 1854, 20, 23504, 3893, 9, 14, 1448, 25, 30, 65, 621, 1766, 50, 3494, 20, 9794, 9, 9, 31, 8144, 43, 17, 7631, 5278, 16, 11358, 47, 90, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Keep scattered images from going outside of container div === Hoping somebody can help. I have recently finished a degree in computing where one of my modules was to create a website. I decided to create a website for my friends parents so once the course was finished I would actually have something I could use. Anyway one of the pages is a gallery. It uses javascript to scatter images randomly across the page. Problem is I needed to keep the images contained so that they didnt appear onto of other items on my page (header for instance). We didnt study javascript on the course as this module was replace so any code is just what I have found on the internet.... HTML: <div id="imageBlock" style="height:1300px; width:1000px;"> <a href="img/DUDLEY.jpg" title="Dudley aged ??"><img src="img/DUDLEY.jpg" /></a> <a href="img/puppies6.jpg"><img src="img/puppies6.jpg" alt="" /></a> <a href="img/Ruben.jpg" title="Ruben aged ???"><img src="img/Ruben.jpg" /></a> <a href="img/wendy.jpg" title="Wendy aged ??"><img src="img/wendy.jpg" /></a> <a href="img/puppies4.jpg"><img src="img/puppies4.jpg" alt="" /></a> <a href="img/puppies7.jpg"><img src="img/puppies7.jpg" alt="" /></a> <a href="img/puppies2.jpg"><img src="img/puppies2.jpg" alt="" /></a> <a href="img/brutus.jpg" title="Brutus aged ??"><img src="img/brutus.jpg" /></a> <a href="img/puppies3.jpg"><img src="img/puppies3.jpg" alt="" /></a> <a href="img/puppies5.jpg"><img src="img/puppies5.jpg" alt="" /></a> </div> Javascript: $(document).ready(function() { var zindexnr = 1; var container = $('#imageBlock') $("img").draggable({ containment: container, start: function(event, ui) { zindexnr++; var cssObj = { 'z-index' : zindexnr }; $(this).css(cssObj); } }); $(function() { $('#imageBlock a').lightBox(); }); //Report the X & Y co-ords $('#imageBlock img').hover(function() { thisX = $(this).css('left') thisY = $(this).css('top') $('#currentX span').text(thisX); $('#currentY span').text(thisY); }) //Initialise everything var screenX = 1000, screenY = 750; var xPos = 0, yPos = 0; var xCounter=0, yCounter = 0; var incrementalDelay = 0; var origImageWidth = 0, origImageHeight = 0 var newImageWidth = 0, newImageHeight = 0 var numImages = $('#imageBlock img').length; //20 xDivAmount = screenX / numImages; // 1000/20 = 50 yDivAmount = screenY / numImages; // 800/20 = 40 //create the position arrays var posXArray = new Array; var posYArray = new Array; //Pre-populate the array for (i=0; i<numImages; i++) //20 loops { posXArray[i] = xCounter; //0 on 1st run xCounter += xDivAmount; //+50 posYArray[i] = yCounter; //0 on 1st run yCounter += yDivAmount; //+40 } $('#imageBlock img').each(function(index) { origImageWidth = $(this).width(); //get the full width and height of each image origImageHeight = $(this).height(); percentMultiply = (Math.floor(Math.random()*4)+1)/10 //random percentage multiplier (up to 40%) //newImageWidth = Math.floor(origImageWidth * percentMultiply); //calculate new sizes //newImageHeight = Math.floor(origImageHeight * percentMultiply); newImageWidth = Math.floor(origImageWidth * 0.6); //hard code new sizes newImageHeight = Math.floor(origImageHeight * 0.6); $(this).css({'width':newImageWidth, 'height':newImageHeight}) //apply new calculated sizes rotation = Math.floor(Math.random()*30)-15+'deg'; //random rotation $(this).css('-webkit-transform' , 'rotate('+rotation+')'); //apply rotation $(this).css('-moz-transform' , 'rotate('+rotation+')'); randX = Math.floor(Math.random()*posXArray.length) //Create random num 1 - array length randY = Math.floor(Math.random()*posYArray.length) //Output the content of the array - purely for DEV reasons for (i=0; i<posXArray.length; i++) { xOut=posXArray[i] yOut=posYArray[i] console.log('X:['+i+'] '+xOut+' Y:['+i+'] '+yOut) } console.log('Array pos for X: '+randX) console.log('Array pos for Y: '+randY) xPos = posXArray[randX]; //position = value at random location yPos = posYArray[randY]; console.log('X: '+xPos) console.log('Y: '+yPos) console.log('') //remove the array values for chosen position posXArray.splice(randX, 1) posYArray.splice(randY, 1) //animate to position $(this).delay(incrementalDelay).animate({'left':xPos,'top':yPos}, 2000) //$(this).animate({'left':xPos,'top':yPos}, 1200) incrementalDelay +=80 //increment time delay for each loop }) }); $(window).load(function () { });
0
[ 2, 643, 7471, 3502, 37, 228, 719, 16, 12147, 13, 12916, 800, 3726, 3726, 3935, 8861, 92, 448, 9, 31, 57, 1989, 842, 21, 1168, 19, 10626, 113, 53, 16, 51, 17113, 23, 20, 1600, 21, 2271, 9, 31, 868, 20, 1600, 21, 2271, 26, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Will a .com domain name gain advantage over a .be domain name in SEO results for Americans === My question to ask is whether a .com domain name will gain advantage over a .be domain name or any other when American people browse the internet, even if the website is totally written in English. In my country, Belgium, when I search the net, pages in Dutch pop up first, even if sometimes I search in English. Thank you.
0
[ 2, 129, 21, 13, 9, 960, 4603, 204, 3288, 3314, 84, 21, 13, 9, 863, 4603, 204, 19, 13, 18, 3894, 1736, 26, 4878, 800, 3726, 3726, 51, 1301, 20, 1349, 25, 1472, 21, 13, 9, 960, 4603, 204, 129, 3288, 3314, 84, 21, 13, 9, 863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Dump all schemas and triggers and import them into another Oracle database === Is there anyway to grab the schemas and triggers from an oracle database and import them into another oracle database(an Oracle TimesTen inmemory db to be precise)? I'm trying to setup an in memory database for testing purposes and need to replicate the production schema.
0
[ 2, 11424, 65, 23874, 18, 17, 7286, 18, 17, 9010, 105, 77, 226, 15759, 6018, 800, 3726, 3726, 25, 80, 2774, 20, 4931, 14, 23874, 18, 17, 7286, 18, 37, 40, 15759, 6018, 17, 9010, 105, 77, 226, 15759, 6018, 5, 210, 15759, 436, 1316...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Web development in .NET - Which techniques to use to build and consume your own API? === We are trying to make up our minds where to start with a new project of upgrading our website. As we have upgraded our old back-end system in .NET we really want to keep working in C# for many reasons like (but not limited to) TFS integration, the development environment, and testing, Azure integration, integrated security, proper documentation, etc. What we also know we want to accomplish is to start with a web based API and consume our own services, first on a regular website, later also on mobile devices. We have been playing around with WCF (OData enabled) Data services and the new Web API which comes with MVC4. My personal preference is working with the Data Services, as more of the OData standard is implemented, like the $select option, which makes the API we would create very simple and extremely useful, and we can ensure we only request the data we use from the client, in JSON, XML, and probably other formats we will not immediately use. Now as our first project will be to implement a website that consumes either the Data service, or the Web API, which frameworks should we look at to consume the services from the client side. Ideally we would like to serve the website from another machine and have the client to connect to the API using Ajax (or JSONP) to read from the service (in a later stage also the CUD actions). For creating the new website we want to buy a set of tools, and we have evaluated Telerik, DevExpress and Ext.NET, but none of these seem as compatible with either of these services as they claim on their site (but perhaps I am missing something). We want to try to stay away of creating our own javascript. I guess my questions are the following: - Which of the techniques for the API is better and why? DataService seems to be quite old - will it still be supported in the future? Is there a third option I should evaluate? - Did someone choose to take on a similar project and can you share your experiences? - Which of the frameworks of Telerik, DevExpress, Ext.NET or any other is more useful to consume any of these APIs from the client side? - Should we use WebForms or MVC and why?
0
[ 2, 2741, 522, 19, 13, 9, 2328, 13, 8, 56, 4212, 20, 275, 20, 1895, 17, 16447, 154, 258, 21, 2159, 60, 800, 3726, 3726, 95, 50, 749, 20, 233, 71, 318, 11433, 113, 20, 799, 29, 21, 78, 669, 16, 26939, 318, 2271, 9, 28, 95, 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...
Backbone and use of Underscore's bindAll function - a better way to ensure consistent context === I'm new to [Backbone](http://backbonejs.org/) and following a tutorial found [here](http://arturadib.com/hello-backbonejs/). [Step 3](http://arturadib.com/hello-backbonejs/docs/3.html) introduced me to [Underscore](http://underscorejs.org/)'s [bindAll](http://underscorejs.org/#bindAll) function. It sounds like a great little time saver but I don't like the way that it is called: _.bindAll(this, "render", "addItem", "appendItem"); I would much rather see something like this: _.bindAll(this.render, this.addItem, this.appendItem); I cannot find a way to do this nicely using the method unmodified. So, __first question__: I've tried `_.bindAll(null, this.render, this.addItem, this.appendItem);` and `window` as my object context, but neither work. Is there a way of avoid strings and use references instead? I'd guess not. Secondly... It got me thinking that if we are going to effectively want to proxy every method, could we then not modify the context of every 'method' call for my prototype, instead of listing them all out, while also not potentially breaking inherited methods. So, we could modify the [`extend`](http://backbonejs.org/#View-extend) method of Backbone's `View` class... var delegate = Backbone.View.extend; Backbone.View.extend = function(/*Object*/ viewObj) { for (var key in viewObj) { if (_.isFunction(viewObj[key])) { // TODO impl of proxying... // Use jQuery for now because I'm not familiar with best way of // doing things with Underscore // See: http://api.jquery.com/jQuery.proxy/ viewObj[key] = (function(originalFn) { $.proxy(function() { this.originalFn(arguments); }, viewObj) )(viewObj[key]); } } // TODO call delegate with correct context? delegate(viewObj); }; This bit of code above is _completely untested_ but hopefully the point is there. My __second question__ then is; if my proposed change seems like a neater solution, why am I having to modify Backbone functions to do something that avoids common boilerplate code? It feels wrong to overwrite Backbone functions. Maybe my assumption is wrong in that by convention, every prototype method is always going to expect the context to be the object is belongs to. Thoughts?
0
[ 2, 24036, 17, 275, 16, 131, 15077, 22, 18, 10193, 1233, 1990, 13, 8, 21, 574, 161, 20, 4062, 8224, 4141, 800, 3726, 3726, 31, 22, 79, 78, 20, 636, 1958, 8640, 500, 5, 21127, 6903, 1958, 8640, 728, 18, 9, 5583, 118, 6, 17, 249,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Maps API v 3: Heatmap Creation Issue === I am trying to work with the google.maps.visualization library. I have included the library in my code and all that, and most of it seems to be working, but when I get to the point of creating the heatmap, I get an error about 'Invalid value at position 96677: [object Object]'. I am not sure what this problem is about, but the error report includes a line of the Google API code: var c; M(b,function(b,e){ try{ a(b)||(c="Invalid value at position "+(e+(": "+b))) }catch(f){ c="Error in element at position "+(e+(": ("+(f[Pb]+")")))}});c&&aa(ja(c));return j } } I looked through the API code a bit, but it's pretty difficult to find anything useful in there. The code I am using to create the heatmap layer is as follows: $.ajax({ url: "../Yield/getYieldData.php", success: function(text) { var data; // var yieldPoints = new google.maps.MVCArray(); var yieldPoints = []; try{ data = $.parseJSON(text); } catch (e) { alert("ERROR: " + e); } for(i=0; i < data.points.length; i++) { // yieldPoints.push({ location: new google.maps.LatLng(data.points[i].lat, data.points[i].lon), weight: data.points[i].yield }); yieldPoints[i] = { location: new google.maps.LatLng(data.points[i].lat, data.points[i].lon), weight: data.points[i].yield }; } var heatMap = new google.maps.visualization.HeatmapLayer({ data: yieldPoints }); heatMap.setMap(map); } }); I'm not sure where the problem is coming from here, but I used the Google API documentation as a template, as found at https://developers.google.com/maps/documentation/javascript/layers#JSHeatMaps (about a third of the way down the page, under the heading 'Adding Weighted Data Points'). As you can see, I also attempted to create the array as an MVCArray, as described in that documentation, but that didn't change anything. In case it's relevant, here's a short sample of the JSON data that is being received from the 'getYieldData.php' call: `{"points":[{"lat":"38.1513366000","lon":"-97.4341659000","yield":"0"},{"lat":"38.1513748000","lon":"-97.4341125000","yield":"0"},{"lat":"38.1513938000","lon":"-97.4341125000","yield":"0"},{"lat":"38.1493263000","lon":"-97.4339447000","yield":"0"},{"lat":"38.1493339000","lon":"-97.4339447000","yield":"0"},{"lat":"38.1493377000","lon":"-97.4339447000","yield":"0"},{"lat":"38.1483650000","lon":"-97.4358291000","yield":"0"},{"lat":"38.1484031000","lon":"-97.4358062000","yield":"0"},` Hopefully this is enough info for someone to see what the problem is- any help at all would be much appreciated. Thank you.
0
[ 2, 8144, 6867, 21, 2159, 566, 2635, 1737, 15022, 2502, 1513, 800, 3726, 3726, 31, 589, 749, 20, 170, 29, 14, 8144, 9, 15022, 18, 9, 20893, 1829, 1248, 9, 31, 57, 506, 14, 1248, 19, 51, 1797, 17, 65, 30, 15, 17, 127, 16, 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...
Can't execute javascript in jsf page === im new to jsf.i have been trying to do simple javascript function with commandbutton.i tried many times but not even able to alert message.this is piece of my code.please anybody guide me what is wrong and what should follow make it run <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:o="http://openfaces.org/"> <h:head> <script type="text/javascript"> function test(){ alert('test'); alert(document.getElementById('frmDashBoard:testbt').value); } </script> </h:head> <h:body> <ui:composition template="../../template/commonLayout.xhtml"> <ui:define name="menu"> <ui:include src="../../template/subMenuAfterLogin.xhtml" /> --> </ui:define> <ui:define name="content"> <div> <h:form id="frmdashboard"> <div name="form_panel" style="width: 984px"> <div class="form_left"> <div> <table> <tr> <td> <br/> <h3>#{message.label_dashboard_header}</h3> <br/> </td> </tr> <tr> <td style="padding-right:2px;padding-bottom:0px;padding-top:0px;"> <table> <tr> <td style="padding-left:0px;padding-right:1px;padding-bottom:0px;padding-top:0px;"> <h:outputLabel value="#{message.label_dashboard_sector}" style="width:40px;" /> </td> <td class="outputDropdown" style="padding-left:0.1em;"> <h:selectOneMenu id="som1" value="TableBean.perInfoAll" title="select a Sector" class="outputDropdown"> <f:selectItem id="t" itemLabel="A1" itemValue="11" /> <f:selectItem id="d" itemLabel="A2" itemValue="22" /> </h:selectOneMenu> </td> </tr> </table> </td> <td style="padding-left:110px;"> <h:commandButton id="testbt" value="#{message.btn_dashboard_search}" action="#{searchBLAction.doAction}" onclick="test()" /> </td> </tr> <tr> </tr> </table> </div> </div> <div class="dashboardBox"> </div> </div> </h:form> </div> </ui:define> </ui:composition> </h:body> </html>
0
[ 2, 92, 22, 38, 15644, 8247, 8741, 19, 487, 18, 410, 2478, 800, 3726, 3726, 797, 78, 20, 487, 18, 410, 9, 49, 57, 74, 749, 20, 107, 1935, 8247, 8741, 1990, 29, 1202, 811, 444, 9, 49, 794, 151, 436, 47, 52, 166, 777, 20, 7863,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 PDO Doesn't insert new records === I do not understand what my problem seem to be. I got the following PHP code: include_once 'db.inc.php'; try { $db = new PDO(DB_INFO, DB_USER, DB_PASS); } catch(PDOException $e) { echo 'Connection failed: ', $e->getMessage(); exit(); } $title = htmlentities($_POST['title']); $entry = htmlentities($_POST['entry']); $sql = "INSERT INTO entries (title, entry) VALUES (?, ?)"; $stmt = $db->prepare($sql); $stmt->execute(array($title, $entry)); $stmt->closeCursor(); I do not receive any error of any kind and the script seem to have worked however it does not insert anything into the database. No matter what I try it doesn't do anything.
0
[ 2, 13, 26120, 351, 537, 1437, 22, 38, 14692, 78, 742, 800, 3726, 3726, 31, 107, 52, 1369, 98, 51, 1448, 2260, 20, 44, 9, 31, 330, 14, 249, 13, 26120, 1797, 45, 468, 1, 13120, 13, 22, 9007, 9, 108, 150, 9, 26120, 22, 73, 1131...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 check if the function is available on compiler? === Is there a way to detect in compilation-time, if a function is built-in on compiler? e.g, something like this: #ifndef ITOA_FUNCTION #define itoa myitoaimplementation #endif Thanks in advance.
0
[ 2, 184, 20, 2631, 100, 14, 1990, 25, 904, 27, 21486, 60, 800, 3726, 3726, 25, 80, 21, 161, 20, 9092, 19, 4868, 8, 891, 15, 100, 21, 1990, 25, 392, 8, 108, 27, 21486, 60, 13, 62, 9, 263, 15, 301, 101, 48, 45, 6926, 821, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Zend Framework internal routing === For example, I have a page in my application called page2 that I want to access like mysite.com/page2 in the application.ini file I would have a section for it resources.router.routes.index.route = '/page2/' resources.router.routes.index.defaults.controller = index resources.router.routes.index.defaults.action = page2 My question is, what if I have several pages that I want to access as children of the index controller. There must be a method that doesn't involve creating a new section in application.ini every time I have a new page... Any advice?
0
[ 2, 10526, 43, 6596, 3117, 19880, 800, 3726, 3726, 26, 823, 15, 31, 57, 21, 2478, 19, 51, 3010, 227, 2478, 135, 30, 31, 259, 20, 1381, 101, 51, 9097, 9, 960, 118, 6486, 135, 19, 14, 3010, 9, 2651, 3893, 31, 83, 57, 21, 1050, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Redis and Querying Values === Redis is conceptually different from traditional SQL databases that I use, and I'm trying to figure out if it is right for my project... I've been looking around but can't seem to find an answer to my question. I have a set of Users that I need to store, each with a unique ID and several values (such as their name) associated with it. It seems like I can simply store those as a hash: user:fef982dcfe1a7bcba4849b4c281bba95 "username" "andrewm" "name" "Andrew" I also have a bunch of messages I want to store, each having a few properties such as the sender and recipient: message:1a7bcba4849b4c281bfef98a952dcfeb "sender" "fef982dcfe1a7bcba4849b4c281bba95" "recipient" "82dcfe1a7bcba4849b4c281bba95fef9" "message" "Hi!" My question is, how would I go about retrieving all of the messages that are sent by a specific user (designated by a their hash). Should I be using a traditional relational database instead, or even a NoSQL database like MongoDB (which I've used before)? If so, does anyone have any suggestions for high performance stores? I won't be doing any true searching (i.e. MySQL `LIKE` queries)-- just key value lookups, really.
0
[ 2, 402, 403, 17, 25597, 68, 4070, 800, 3726, 3726, 402, 403, 25, 14425, 102, 421, 37, 1361, 4444, 255, 6018, 18, 30, 31, 275, 15, 17, 31, 22, 79, 749, 20, 1465, 70, 100, 32, 25, 193, 26, 51, 669, 9, 9, 9, 31, 22, 195, 74, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Fullcalendar with Twitter Bootstrap? === The Fullcalendar widget is awesome. I'm using it in a Twitter Bootstrap project, and it looks just about perfect out of the box. One thing that sticks out, though, is the styling for the buttons, such as forward, back, and today. Is there a way to change how Fullcalendar outputs the button code so that it conforms to Bootstrap's *Button Group*? E.g.: <div class="btn-group"> <button class="btn">1</button> <button class="btn">2</button> <button class="btn">3</button> </div> If not, I imagine that one way to go would be to create the buttons on my own and wire them into the Fullcalendar widget. But I'm not a jquery pro, and I'd prefer to try something simpler. Thanks.
0
[ 2, 503, 3430, 219, 2542, 29, 10623, 5894, 16514, 60, 800, 3726, 3726, 14, 503, 3430, 219, 2542, 4807, 43, 3060, 25, 13706, 9, 31, 22, 79, 568, 32, 19, 21, 10623, 5894, 16514, 669, 15, 17, 32, 1879, 114, 88, 2107, 70, 16, 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...
How do I create a new MongoDB from the command line with auth turned on? === For the purpose of wanting to create a MongoDB database in a Capistrano task, I need to figure out how to create a new database via the MongoDB shell when MongoDB is running with auth turned on. With auth turned on the MongoDB shell can't do anything without first authenticating, but authenticating has to happen while using the **admin** database as far as I'm aware. So I've been connecting to it for starters like: sudo -u mongodb mongo admin --eval "db.auth(username, password)" And that authenticates me for further action but...at that point I need to create the database, and a user for it in the same shell session. I can't however: sudo -u mongodb mongo admin --eval "db.auth(username, password);use new_database" Because `use database` can't be used in eval. So I've tried instead: sudo -u mongodb mongo admin --eval "db.auth(username, password);db = connect('localhost:27017/new_database')" And that will actually get me an instance of the new database I want created but if I try to: sudo -u mongodb mongo admin --eval "db.auth(username, password);connect('localhost:27017/new_database').addUser(new_user, new_password)" I get an authentication error, so apparently using the `connect()` command forgets that I've authenticated before. So this is where I'm stuck, trying to create a database in one line with MongoDB using auth and an admin user. Any suggestions on how I can do this?
0
[ 2, 184, 107, 31, 1600, 21, 78, 3521, 5474, 220, 37, 14, 1202, 293, 29, 10343, 96, 412, 27, 60, 800, 3726, 3726, 26, 14, 2131, 16, 4638, 20, 1600, 21, 3521, 5474, 220, 6018, 19, 21, 2605, 702, 17555, 3005, 15, 31, 376, 20, 1465...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Devise redirect to sign_in_path for unauthenticated users without using :database_authenticatable === I am using cancan, devise, and omniauth in a rails app. I'm quite happy with omniauth, and the method current_user is helpful. Ability class is also helpful. When a user registers, I only get his email from omniauth, and manually create a User for him with some parameters. So I am not using the devise way of creating users. Consequently, I have no need for :database_authenticatable. Having it prevents me from saving a user without a password. Not having it however, makes users go to '/' instead of '/users/sign_in' when they hit an unauthorized resource. I would like to not use :database_authenticatable, and have users go to '/users/sign_in' if they are unauthorized. How would I do that? Note: almost all my controllers have fine-grained authenticate_user! beforefilter, for example: class UsersController < ApplicationController before_filter :authenticate_user!, :except => [:index, :index_small, :show, :new , :sign_in ] so I'm not sure if I can do anything with `before_filter :authenticate_user!` in application_controller. If I can get rid of this filter on all the controllers, it would be nice also.
0
[ 2, 29276, 302, 14706, 20, 1676, 1, 108, 1, 8353, 26, 367, 1346, 2504, 1786, 1669, 3878, 366, 568, 13, 45, 18768, 8436, 1, 1346, 2504, 12630, 5924, 800, 3726, 3726, 31, 589, 568, 92, 1245, 15, 29276, 15, 17, 14677, 1346, 96, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Most elegant way of checking the value of a query string parameter if not null? === if(Page.Request.QueryString["ParamName"] != null) if(Page.Request.QueryString["ParamName"] == expectedResult) //Do something spectacular The above seems cludgey. Is there a more elegant/compact way of checking if a query string parameter is not null and if so - retrieving the value of it?
0
[ 2, 127, 11614, 161, 16, 9886, 14, 1923, 16, 21, 25597, 3724, 18906, 100, 52, 16203, 60, 800, 3726, 3726, 100, 5, 6486, 9, 99, 10351, 9, 8190, 93, 11130, 2558, 7, 6351, 79, 7259, 7, 500, 13, 187, 3726, 16203, 6, 100, 5, 6486, 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...
Can we replace application with lower version from higher version === Two Android apk with API <uses-sdk android:minSdkVersion="15" /> One with version name 1.0 and the other with version name 1.1. Can i install 1.0 version on 1.1?
0
[ 2, 92, 95, 3934, 3010, 29, 987, 615, 37, 1184, 615, 800, 3726, 3726, 81, 13005, 21, 17244, 29, 21, 2159, 13, 1, 3699, 18, 8, 18, 43, 197, 13005, 45, 2160, 18, 43, 197, 10898, 3726, 7, 1193, 7, 13, 118, 1, 53, 29, 615, 204, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Error while installing PowerTools === I recently installed the latest PowerTools on Tridion 2011 SP1. After installing my CM gives the following error. > Uncaught ReferenceError: Tridion is not defined Attaching a screenshot of the error below ![enter image description here][1] [1]: http://i.stack.imgur.com/JRw6l.png If now I remove the PowerTools, I get an following error. System.IO.FileNotFoundException: Could not load file or assembly 'Interop.TDSI18NLib, Version=5.4.0.0, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' or one of its dependencies. The system cannot find the file specified. File name: 'Interop.TDSI18NLib, Version=5.4.0.0, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' at Tridion.Web.UI.Models.TCM54.LocalizationModule.InitializeCulture(Object sender, EventArgs args) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under executable C:\Windows\SysWOW64\inetsrv\w3wp.exe --- A detailed error log follows. === Pre-bind state information === LOG: User = NT AUTHORITY\NETWORK SERVICE LOG: DisplayName = Interop.TDSI18NLib, Version=5.4.0.0, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/Tridion/web/WebUI/WebRoot/ LOG: Initial PrivatePath = C:\Program Files (x86)\Tridion\web\WebUI\WebRoot\bin Calling assembly : Tridion.Web.UI.Models.TCM54, Version=6.1.0.55920, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files (x86)\Tridion\web\WebUI\WebRoot\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Interop.TDSI18NLib, Version=5.4.0.0, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/webui/f9209e65/566ab287/Interop.TDSI18NLib.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/webui/f9209e65/566ab287/Interop.TDSI18NLib/Interop.TDSI18NLib.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Tridion/web/WebUI/WebRoot/bin/Interop.TDSI18NLib.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Tridion/web/WebUI/WebRoot/bin/Interop.TDSI18NLib/Interop.TDSI18NLib.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/webui/f9209e65/566ab287/Interop.TDSI18NLib.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/webui/f9209e65/566ab287/Interop.TDSI18NLib/Interop.TDSI18NLib.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Tridion/web/WebUI/WebRoot/bin/Interop.TDSI18NLib.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Tridion/web/WebUI/WebRoot/bin/Interop.TDSI18NLib/Interop.TDSI18NLib.EXE.
0
[ 2, 7019, 133, 25429, 414, 20799, 18, 800, 3726, 3726, 31, 1989, 4066, 14, 5736, 414, 20799, 18, 27, 2286, 43, 872, 542, 3782, 165, 9, 75, 25429, 51, 2390, 2352, 14, 249, 7019, 9, 13, 1, 16061, 12647, 2801, 29992, 45, 2286, 43, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 it possible to disable window moving on changing it size in XNA game? === I'm changing the window size in that way: m_GraphicsDeviceManager.PreferredBackBufferWidth = (int)i_NewSize.X; m_GraphicsDeviceManager.PreferredBackBufferHeight = (int)i_NewSize.Y; m_GraphicsDeviceManager.ApplyChanges();
0
[ 2, 25, 32, 938, 20, 1460, 579, 1463, 1219, 27, 4226, 32, 1072, 19, 993, 325, 250, 60, 800, 3726, 3726, 31, 22, 79, 4226, 14, 1463, 1072, 19, 30, 161, 45, 307, 1, 12084, 18, 546, 18507, 22256, 9, 306, 28855, 1958, 2345, 6866, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 vs SSI in html forced environment === sorry for the strange title. I have a quite large website written in pure HTML. Now I have to make some standard areas of the site, single time editable. So I'm thinking about a smart way to include this elements through an external file. I can't change the .html extension of the page and forcing the server to php-parse every page seems a waste of resources. I must choose between: 1) including via SSI (I have read that it has bad performances) 2) mod_rewriting to fake .html extension and including via php include What would you do? What's the fastest and least expensive way? Is one of them most SEO-friendly?
0
[ 2, 13, 26120, 4611, 13, 18, 18, 49, 19, 13, 15895, 1292, 2307, 800, 3726, 3726, 1875, 26, 14, 2578, 581, 9, 31, 57, 21, 1450, 370, 2271, 642, 19, 4267, 13, 15895, 9, 130, 31, 57, 20, 233, 109, 1236, 924, 16, 14, 689, 15, 345...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 convert a negative/positive string number into negative/pozitive double === Does anyone know how to convert the string value type `-4,5` or `5,4` into a double `-4.5` or `5.4`?
0
[ 2, 8247, 8406, 21, 3682, 118, 21299, 3724, 234, 77, 3682, 118, 1638, 2553, 6142, 1494, 800, 3726, 3726, 630, 1276, 143, 184, 20, 8406, 14, 3724, 1923, 1001, 13, 1, 8, 300, 15, 264, 1, 54, 13, 1, 264, 15, 300, 1, 77, 21, 1494, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0...
Can you set properties to beans when using component-scan? === Is it possible to set properties to beans when they are auto-detected? I have a bean which would need to read a text file and I'd like to inject the path, but this bean is part of a web app where all beans are auto-detected.
0
[ 2, 92, 42, 309, 3704, 20, 14685, 76, 568, 5912, 8, 18, 1245, 60, 800, 3726, 3726, 25, 32, 938, 20, 309, 3704, 20, 14685, 76, 59, 50, 3108, 8, 28262, 69, 60, 31, 57, 21, 15322, 56, 83, 376, 20, 1302, 21, 1854, 3893, 17, 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...
Plotting graph with gnuplot in Shell scripting === I have to plot a graph using gnuplot with the help of shell script. I have written this code but its not working. i want to plot the graph in an html file so that i can see that graph in browser. echo "set term canvas mousing size 500, 500 set output "file_name.html" plot 'my_file.txt' with lines" | gnuplot I have saved this file in .bash on the desktop. Now i wrote this in terminal but it didn't work sh file_name.bash Please someone help me out with this. I am totally stuck with this thing since yesterday. :-(
0
[ 2, 22716, 7210, 29, 26092, 13221, 38, 19, 3593, 3884, 68, 800, 3726, 3726, 31, 57, 20, 3798, 21, 7210, 568, 26092, 13221, 38, 29, 14, 448, 16, 3593, 3884, 9, 31, 57, 642, 48, 1797, 47, 82, 52, 638, 9, 31, 259, 20, 3798, 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...
How to determine whether a given set of locations are contained within a parent location === If I supply a location e.g. London, and then a series of places e.g. south kensington, chelsea, southend(region outside of london), I want to determine which of these series of places is within the region of London. Is this possible to achieve via an api call? It is also important that I can check if 50 different places belong to London in a single call, otherwise I will probably exceed useage limits. Thanks, David
0
[ 2, 184, 20, 3746, 1472, 21, 504, 309, 16, 4095, 50, 3437, 363, 21, 4766, 1474, 800, 3726, 3726, 100, 31, 2837, 21, 1474, 13, 62, 9, 263, 9, 479, 15, 17, 94, 21, 231, 16, 1489, 13, 62, 9, 263, 9, 180, 20438, 15, 9526, 15, 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...
Data transfer between Qt and a C++ code === I have a C++ code and now I am thinking to prepare a UI with Qt since its language is also C++. Before attempting to do that I wonder how can I transfer data between my code and UI code. I mean, I do not want to write variables to a textfile and let UI to read it. Instead I want this to be done internally. I know this is possible but dont know where to start. Any idea?
0
[ 2, 1054, 2617, 128, 2593, 38, 17, 21, 272, 20512, 1797, 800, 3726, 3726, 31, 57, 21, 272, 20512, 1797, 17, 130, 31, 589, 1440, 20, 5723, 21, 13, 5661, 29, 2593, 38, 179, 82, 816, 25, 67, 272, 20512, 9, 115, 6314, 20, 107, 30, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Temp Table Garbage Collection === I seem to be running into a problem with temp table garbage collection: CREATE PROCEDURE dbo.SetTestTempTable(@value bit) AS SET NOCOUNT ON IF OBJECT_ID('tempdb..#TestTempTable') IS NOT NULL DROP TABLE #TestTempTable SELECT @value AS Value INTO #TestTempTable GO EXEC dbo.SetTestTempTable 1 SELECT * FROM #TestTempTable The above code produces the error Msg 208, Level 16, State 0, Line 3 Invalid object name '#TestTempTable'. I think because #TestTempTable is getting garbage collected when the proc exits. Is there a way of preventing this? I don't want to have every caller need to explicitly create the temp table before calling the procedure.
0
[ 2, 13, 9577, 859, 15024, 1206, 800, 3726, 3726, 31, 2260, 20, 44, 946, 77, 21, 1448, 29, 13, 9577, 859, 15024, 1206, 45, 1600, 7004, 13, 43, 1192, 9, 18, 16116, 38, 9577, 5924, 5, 1, 15165, 1142, 6, 28, 309, 90, 16549, 27, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Bash - sort by first letter of file name === I'm trying to write a command for mplayer that will play all the music files in a directory, in order. alias mplay='mplayer -playlist <(find "$PWD" -type f|sort -n)' This works fine if I am already in the directory I'm playing music from. In fact, it even works if I'm in a directory back and I type 'mplay MusicFileDirectory' for instance. However, the command breaks when I'm not in the directory I play from and the files are numbered 1, 2, 3 ... 10, 11 etc (instead of 01, 02 ... 11) - the 10, 11 files are now played before the 2nd file. This is because sort is being applied to an expanded file path, ie MusicFileDirectory/1, so it does not sort numerically. How would I get the sort command to only sort the final part of a file path, so I can type 'mplay /home/james/Music/MusicFileDirectory' for example and it only uses the names of the files in the directory to sort the playlist?
0
[ 2, 13158, 13, 8, 2058, 34, 64, 1748, 16, 3893, 204, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 1202, 26, 307, 14049, 30, 129, 418, 65, 14, 232, 6488, 19, 21, 16755, 15, 19, 389, 9, 15794, 307, 5438, 3726, 22, 79, 14049, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 can't I divide a fixnum by another fixnum? === I'm currently trying to divide `counts["email"]` a hash containing the number 82,000 by a variable `total` which contains the value 1.3 million. When I run `puts counts["email"]/total` I get 0. Why can't I perform division on these?
0
[ 2, 483, 92, 22, 38, 31, 8918, 21, 6098, 6336, 34, 226, 6098, 6336, 60, 800, 3726, 3726, 31, 22, 79, 871, 749, 20, 8918, 13, 1, 16549, 18, 2558, 7, 62, 8079, 7, 500, 1, 21, 19170, 3503, 14, 234, 469, 8561, 34, 21, 7612, 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...
CSS a property for specific id pseudo class? === Any one know how to apply a css propert to the a tag, but only when it's in a certain div? I would like the .router_li div to have the hover effect, but any other links. I'm not sure what this is called. I think it's called a pseudo class, and I'm not doing it right. I tried this: a:router_li:hover{ background-color:yellow; width: 200px; height: 60px; background-color: #2c5fac; border: 1px; border-color: #FFFFFF; border-top-right-radius: 8px; border-top-left-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; border-style:solid; border-width:1px; color: white; }
0
[ 2, 272, 18, 18, 21, 1354, 26, 1903, 4924, 8452, 718, 60, 800, 3726, 3726, 186, 53, 143, 184, 20, 5645, 21, 272, 18, 18, 4119, 38, 20, 14, 21, 3383, 15, 47, 104, 76, 32, 22, 18, 19, 21, 1200, 13, 12916, 60, 31, 83, 101, 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...
Chrome Padding Issue On Paragraph Text === I'm a little new to the web development scene and I was having a very persistent problem with Chrome that I can't quite seem to figure out. I'm using the [Compact New Previewer](http://tympanus.net/codrops/2010/10/03/compact-news-previewer/) to show new entries to the database. You'll notice that if you view the demo in Firefox everything fits nice and snug, but in Chrome the paragraphs within the left-hand column get truncated. I'm having this same issue in my own implementation as seen below (Note: My implementation is a little different from the demo): ![Paragraph text gets truncated][1] [1]: http://i.stack.imgur.com/QniAu.png You can see this issue for yourself if you go [this website](http://lists.cogmation.com). What I've tried: 1. [CSS Reset](http://developer.yahoo.com/yui/reset/) - yields no different results.
0
[ 2, 13, 12985, 4432, 3258, 1513, 27, 20599, 1854, 800, 3726, 3726, 31, 22, 79, 21, 265, 78, 20, 14, 2741, 522, 1691, 17, 31, 23, 452, 21, 253, 15348, 1448, 29, 13, 12985, 30, 31, 92, 22, 38, 1450, 2260, 20, 1465, 70, 9, 31, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
github uses Smart HTTP === I setup [password caching][1], but it's odd in that I thought that I'd already done that. From an e-mail to github, it seems that they changed things a bit: > Hello Thufir, > > What you are seeing is that all newly created repos are now using > Smart HTTP instead of SSH by default. We have a help article here that > explains how to change it here: > https://help.github.com/articles/why-is-git-always-asking-for-my-password > > We also have a blog post about it here: > https://github.com/blog/1104-credential-caching-for-wrist-friendly-git-usage The oddity which I see is that I seem to recall following those exact directions some time ago, for caching the password. Also, isn't there a better approach, with a public key perhaps? I'm not quite sure where my password is cached, but I know that it's not such a great idea. (I'm on Linux so cannot use the suggested .exe in the e-mail.) [1]: https://help.github.com/articles/set-up-git
0
[ 2, 13, 10404, 20926, 2027, 3978, 7775, 800, 3726, 3726, 31, 18161, 636, 6201, 9587, 1658, 7192, 500, 2558, 165, 500, 15, 47, 32, 22, 18, 4210, 19, 30, 31, 289, 30, 31, 22, 43, 614, 677, 30, 9, 37, 40, 13, 62, 8, 8079, 20, 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 I can do to read the tag value for my persistence.xml <jta-data-source> in from a file config.properties === I want to do something like this: **config.properties:** dsname=value; anotherValue=anotherValue; **persitence.xml** <jta-data-source>${dsname}</jta-data-source>
0
[ 2, 184, 31, 92, 107, 20, 1302, 14, 3383, 1923, 26, 51, 28584, 9, 396, 8184, 13, 1, 728, 536, 8, 18768, 8, 12097, 1, 19, 37, 21, 3893, 13, 14093, 2816, 9, 10890, 106, 3915, 800, 3726, 3726, 31, 259, 20, 107, 301, 101, 48, 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...
VB.NET BindingSource in Module not Updating === I have a module in my project that I'm using as a sort of print Queue. I have an error list in it. I want the error list to be bindable so that when you open up the error console, new errors will flow through automagically. I tried using a `List(Of String)` but you can't bind a DataGrid to a string... So stupid... Anyways, now I'm using a `DataTable` with a `DataView` and `BindingSource`. Problem is, when I first open the Error form, the data is there but new errors don't appear in the form. I made a very simple test form where I put a timer on it that would generate random numbers and add it to a `DataTable` with a `DataView` and `BindingSource` and it works if all of those members are on the Form, but as soon as any piece of it is in a module, it doesn't auto update, just like my project. Why won't a `BindingSource` auto-update from a Module?
0
[ 2, 13, 20468, 9, 2328, 8728, 12097, 19, 12613, 52, 71, 43, 1880, 800, 3726, 3726, 31, 57, 21, 12613, 19, 51, 669, 30, 31, 22, 79, 568, 28, 21, 2058, 16, 4793, 22521, 9, 31, 57, 40, 7019, 968, 19, 32, 9, 31, 259, 14, 7019, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Spinner onItemSelected result to a textview? === I've got a spinner working where `onItemSelected` outputs a Toast. I want it to display a string value in a textview instead. So how would you rewrite the below method to show a string in a textview called denomiTV: public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { Toast.makeText(parent.getContext()), "Your Selection is: " + parent.getItemAtPosition(pos).toString(), Toast.LENGTH_LONG).show(); } I tried this, but Eclipse says that `.setText` is not correct here: public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { denomiTV.setText(parent.getContext(), "Your selection is:" + parent.getItemAtPosition(pos)); }
0
[ 2, 13005, 3310, 1031, 27, 2119, 79, 18, 7138, 829, 20, 21, 1854, 4725, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 3310, 1031, 638, 113, 13, 1, 218, 2119, 79, 18, 7138, 1, 5196, 18, 21, 13865, 9, 31, 259, 32, 20, 3042, 21, 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...
proving a 3CNF related prob. is in P === I need help proving that this problem is decidable in polynomial-time: **Input:** a 3CNF formula with more than one clause. **Question:** can the formula be divided into two satisfiable 3CNF formulas ? **Example:** given the formula: (x1 or not(x2) or x3) and (x1 or x2 or x3) and (not(x1) or not(x2) or not(x3)) the answer is "yes", as we can divide into these two satisfiable 3CNF formulas: 1. (x1 or not(x2) or x3) and (x1 or x2 or x3) 2. (not(x1) or not(x2) or not(x3))
2
[ 2, 15333, 21, 203, 150, 11408, 1597, 895, 220, 9, 25, 19, 351, 800, 3726, 3726, 31, 376, 448, 15333, 30, 48, 1448, 25, 121, 10220, 579, 19, 15039, 8, 891, 45, 13, 1409, 108, 4881, 45, 1409, 21, 203, 150, 11408, 3729, 29, 91, 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...
QTableView cell text alignment - changing without iterating === Is there a better way of changing a column text alignment? I'm iterating through all the cells in the column: for r in range(self.rowCount()): self.item(r, column).setTextAlignment(Qt.AlignmentFlag.AlignCenter) Isn't there a better (more straightforward) way of doing this?
0
[ 2, 2593, 5924, 4725, 1667, 1854, 12448, 13, 8, 4226, 366, 32, 106, 1880, 800, 3726, 3726, 25, 80, 21, 574, 161, 16, 4226, 21, 4698, 1854, 12448, 60, 31, 22, 79, 32, 106, 1880, 120, 65, 14, 2934, 19, 14, 4698, 45, 26, 761, 19, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Toggle Blind+Slide Effect not working in Jquery === I have created this combi effect using jquery ui.. http://jsfiddle.net/wnmUj/2/ The problem is that it does not toggle as same as when we click first, i want reverse of that effect when we click the button second time and so on but it is not up to the mark while clicking second time... Hide effect should like this:- $(".menuViewArea").hide( "blind", {direction: "vertical"}, 1000 );
0
[ 2, 20, 263, 4875, 4631, 2430, 18, 1210, 546, 1590, 52, 638, 19, 487, 8190, 93, 800, 3726, 3726, 31, 57, 679, 48, 12994, 49, 1590, 568, 487, 8190, 93, 13, 5661, 9, 9, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 6156, 79, 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...
Mod_Rewrite wildcard's / appending === I'm trying to make a global rule with a category on my website where something automatically gets added to the end of url. An example: www.websitename.com/category/page.html gets changed to www.websitename.com/category/page.html?somethingelse and anything subsequently which is www.websitename.com/category/* gets appended with ?somethingelse I know I could do this with individual 301 redirects but is there a one rule fits all? as every time a new page is created currently, a new redirect would have to be made.
0
[ 2, 7226, 1, 99, 23716, 23003, 22, 18, 13, 118, 4865, 7601, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 21, 2062, 1828, 29, 21, 3230, 27, 51, 2271, 113, 301, 7499, 3049, 905, 20, 14, 241, 16, 287, 6362, 9, 40, 823, 45, 13, 648...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: Lock app with password === I want to *lock my application with a password* which the user has set in the applications settings. Each time the main acitivity of my app is going to be shown, a password dialog should be shown instead. I know how to do that, but i wonder... : How do i store the password the user has set? I can't store it in **SharedPreferences** because you can delete SharedPreferences in your phone's settings. I thought about a **textfile** which holds the password, but this file can be deleted, cant it? Any ideas? Thanks!
0
[ 2, 13005, 45, 3991, 4865, 29, 20884, 800, 3726, 3726, 31, 259, 20, 1637, 3966, 51, 3010, 29, 21, 20884, 2483, 56, 14, 4155, 63, 309, 19, 14, 3767, 12410, 9, 206, 85, 14, 407, 21, 1892, 38, 9633, 16, 51, 4865, 25, 228, 20, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Strange border effect === I'm coming across an issue that I feel like I've found (and solved) before. But can't remember what or how. I'm using jQuery Mobile and re-skinning it majorly. Part of this is putting a solid thick line at the bottom of the nav items. So I've overridden the borders so I have a left and right 1px border, then a 10px bottom border. But the bottom border is jagged, it looks like the left and right are trying to come over half of the bottom border but not all of it. I've attached a screenshot of the problem (I've increased bottom-border to 25px to make it more obvious). Any ideas where this problem is coming form and how to solve? ![screenshot][1] [1]: http://i.stack.imgur.com/oE7oc.png
0
[ 2, 2578, 1862, 1590, 800, 3726, 3726, 31, 22, 79, 880, 464, 40, 1513, 30, 31, 583, 101, 31, 22, 195, 216, 13, 5, 290, 15091, 6, 115, 9, 47, 92, 22, 38, 1518, 98, 54, 184, 9, 31, 22, 79, 568, 487, 8190, 93, 3241, 17, 302, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, OpenGL, and GTK. === I want a GTK GUI with two OpenGL areas that will have different scenes drawn onto them. Does anyone know of an example of code that does this? [This blog post][1] offers an full working example but when I try to add a second OpenGL drawing area, it seems that OpenGL draws both scenes to the same widget. This, of course, is wrong. [1]: http://modarnis.com/Articles/gtk_gl_python.html
0
[ 2, 20059, 15, 368, 8430, 15, 17, 9509, 197, 9, 800, 3726, 3726, 31, 259, 21, 9509, 197, 9457, 29, 81, 368, 8430, 924, 30, 129, 57, 421, 3918, 3160, 1204, 105, 9, 630, 1276, 143, 16, 40, 823, 16, 1797, 30, 630, 48, 60, 636, 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...
Haskell -- sort list with impure function === How can I sort list with IO Compare function? sortWith :: [String] -> (String -> String -> IO Bool) -> IO [String] Sortby expects `(a->a->Bool)` and I don't know, how to deal with it. I am too lazy to implement quick sort myself.
0
[ 2, 63, 16507, 13, 8, 8, 2058, 968, 29, 5420, 4221, 1990, 800, 3726, 3726, 184, 92, 31, 2058, 968, 29, 13, 1963, 11590, 1990, 60, 2058, 1410, 13, 45, 45, 636, 11130, 500, 13, 8, 1, 13, 5, 11130, 13, 8, 1, 3724, 13, 8, 1, 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 to protect an API Key when using JavaScript? === So, I'm developing a small application just for my own use and perhaps an open source project on Git. I'm using an API from Envato Marketplaces, and as you all know there are some operations that don't require any keys, but in the same time there are some that do require. I first made a nice API wrapper for the Envato API in PHP, but then I decided to experiment a little bit with JavaScript, so I'm developing the same wrapper with JavaScript. So far I have no problems with the public operations, but I now have to use the API Key. My question would be if there's a way to protect the API Key in JavaScript. I cannot just put it there in plain text as it can then be used by others who see the code. So would there be an implementation where the API remains secret ? Maybe grabbing it from a JSON text file with XHR ?
0
[ 2, 184, 20, 2196, 40, 21, 2159, 1246, 76, 568, 8247, 8741, 60, 800, 3726, 3726, 86, 15, 31, 22, 79, 3561, 21, 284, 3010, 114, 26, 51, 258, 275, 17, 1774, 40, 368, 1267, 669, 27, 13, 10404, 9, 31, 22, 79, 568, 40, 21, 2159, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 update date,year and month to an existing table in mysql === How to update the Current date ,month,year to an existing table,and when ever the data in the table is modified automatically date should be modified .
0
[ 2, 184, 20, 11100, 1231, 15, 731, 17, 1617, 20, 40, 3149, 859, 19, 51, 18, 22402, 800, 3726, 3726, 184, 20, 11100, 14, 866, 1231, 13, 15, 6444, 15, 731, 20, 40, 3149, 859, 15, 290, 76, 462, 14, 1054, 19, 14, 859, 25, 5372, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Posting Message with Photo Album === Had a question, and tried to dig through the graph docs but I didn't find anything. Ideally I would like to do a create album call with the initial set of images included. Once that was posted, I would expect to see a post representing that album in my feed. Not just a story about the photos that were posted. I also noticed that when I post photos, if they have a message associated with them, then they come through as posts in the feed (one per photo), however items with no description are merely stories. Is there a way to accomplish what I am trying to do? Basically I want to allow my client to post a facebook message with multiple images, and then in our monitoring section see that post with all the image data. Right now I am not seeing all the data I need coming back from the feed as non-story posts.
0
[ 2, 15669, 2802, 29, 3056, 244, 800, 3726, 3726, 41, 21, 1301, 15, 17, 794, 20, 6131, 120, 14, 7210, 9765, 18, 47, 31, 223, 22, 38, 477, 602, 9, 5628, 102, 31, 83, 101, 20, 107, 21, 1600, 244, 645, 29, 14, 2104, 309, 16, 3502...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
JEditorPane - switching back to the default editor kit === If you change the editor kit of a JEditorPane to HTMLEditorKit, how do you change it back to the default (plain text) editor kit, like how it is when you first instantiate one? I want it to do this so that I can load all of the html and display it as plain text, not as formatted text, when the user switches to html mode (I'm making a dreamweaver-type app). I tried: DefaultEditorKit kit = new DefaultEditorKit(); page.setEditorKit(kit); But that makes the editor pane uneditable. How can I switch the editor kit back to plain text?
0
[ 2, 487, 13401, 16660, 13, 8, 13027, 97, 20, 14, 12838, 1835, 6346, 800, 3726, 3726, 100, 42, 753, 14, 1835, 6346, 16, 21, 487, 13401, 16660, 20, 13, 15895, 13401, 13703, 15, 184, 107, 42, 753, 32, 97, 20, 14, 12838, 13, 5, 9897,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Understanding Dependency Injection / Use of Windsor IOC Container === I'm developing an Azure Worker Role that has 2 threads. I'm attempting to use the Castle Windsor IOC container per the patterns on the Castle Website as well as in accordance with sample projects and posts written by apparent Windsor / IOC experts. I have achieved what I would consider to be the first level of implementing IOC in my project. I have created a Windsor container at the very root of my application and used the container to load the concrete implementations of the two worker threads. There is a lot of documentation online how to do this sort of thing for a variety of different types of applications and I feel pretty confident I applied this correctly to the Azure Worker Role. The next task I want to do seems to be incredibly basic, but after hours of research I can't figure out exactly how things are supposed to work. One of my Worker Role threads uses the SuperSockets platform from CodePlex. The platform implements a socket protocol server stack that after going through several layers of classes, ultimately calls my custom processing code. In this code, I'm using several services provided by Azure Storage. I don't want to create a direct dependency in my application on any concrete class that implements these storage functions so I have developed an interface. I'm completely stuck now in figuring out how to get an instance of my concrete storage library this deep in my application. At the very root level, I could of course get an instance of the storage class and propagate it down through all of the class constructors until I get to the code that actually uses it. This seems to be unwieldy and bad design since I am requiring classes that don't need this functionality to know about the storage interface. Perhaps I'm missing something, but unless I do this, I don't see any other way to do constructor injection. Is this a case for Property injection? I've also read about the Typed Factory Facility, but I'm unable to discern is this is the proper place to use it or not. If so, would I just use a singleton to access the kernel in order to get the instances I need? I've looked at the "ToBeSeen" MVC3 example from the Castle Windsor site and I've tried to emulate the case where that program is resolving the FormsAuthenticationService. In the Account controller that uses it, there is just a public virtual interface reference property defined in the class. I can't see anywhere in the project where parameter DI is explicitly setup. I've tried doing the same thing in my own project, but my storage interface property is never set. My guess is that because in the "ToBeSeen" project, the container is directly resolving the concrete class of the controller that has the property. Sorry for such a long post. I assume I'm clearly misunderstanding a fundamental premise of IOC so perhaps through my verbose explanation, someone knowledgeable can see where my misunderstanding lies.
0
[ 2, 3260, 26835, 13646, 13, 118, 275, 16, 10784, 31, 2499, 12147, 800, 3726, 3726, 31, 22, 79, 3561, 40, 25715, 7444, 597, 30, 63, 172, 20396, 9, 31, 22, 79, 6314, 20, 275, 14, 1339, 10784, 31, 2499, 12147, 416, 14, 6282, 27, 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...
Placing image above div pushes content in other places === I'm trying to place an image above the top bar of a div on my website on the left side of where the navigation bar is. This is what happens with my attempt at it... http://justmyshit.com/shaunmichael/ This is what it should look like... http://justmyshit.com/shaunmichael/index2.html And this is what I would like it to look like... http://justmyshit.com/shaunmichael/sitefix.jpg I've tried multiple things such as placing the div for the image in different spots in the code, and changing css elements for the div, but everything seems to push the other content images out of place on the website I appreciate your help!!
0
[ 2, 5861, 1961, 784, 13, 12916, 16271, 2331, 19, 89, 1489, 800, 3726, 3726, 31, 22, 79, 749, 20, 209, 40, 1961, 784, 14, 371, 748, 16, 21, 13, 12916, 27, 51, 2271, 27, 14, 225, 270, 16, 113, 14, 8368, 748, 25, 9, 48, 25, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
GIT: restore formatting from master branch === <p> I created a <i>test</i> branch on a <i>master</i> branch and made some commits on it. Among these commits there were auto-formatting changes. So when I type <code>git diff master test</code> I can see almost every line with old formatting removed (- in red) and added (+ in green) a new line with a new formatting. </p> <p> I would like to keep my changes on a test branch but I would like to restore the old formatting. Is that even possible? Does git know which new lines correspond to the old lines? If the line was modified it would be easy to do, but git diff displays it as a removed and then an added line - like they had nothing in common in git's mind. </p> <p> I tried various merge strategies, but it seems that this problem needs something more. </p>
0
[ 2, 13, 10404, 45, 8454, 2595, 1203, 37, 1129, 1686, 800, 3726, 3726, 13, 1, 306, 1, 31, 679, 21, 13, 1, 49, 1, 10543, 1, 118, 49, 1, 1686, 27, 21, 13, 1, 49, 1, 4594, 1, 118, 49, 1, 1686, 17, 117, 109, 9686, 18, 27, 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...
How to upload a file on mobile === is there any way to use `<input type="file">` on mobile devices? If not, what file upload methods are for mobile devices?
1
[ 2, 184, 20, 71, 8294, 21, 3893, 27, 3241, 800, 3726, 3726, 25, 80, 186, 161, 20, 275, 13, 1, 108, 4881, 1001, 3726, 7, 16877, 7, 1, 27, 3241, 4690, 60, 100, 52, 15, 98, 3893, 71, 8294, 3195, 50, 26, 3241, 4690, 60, 3, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
iOS memory is not being released, background thread === I have two View Controllers, one with a grid of buttons, and the second one is a detailed description based on the button the user presses. I'm using "Mark Heap" in Instruments allocations tool and finding that my app is increasing in memory after the user sees the detailed View Controller and then presses the back button in the navigation bar. IT should result in a net change of zero for memory... I'm using ARC, xcode 4.2.1, deploying to ios 5.0+ When I load the new ViewController after the button press, I load some data images in a background thread. Is it possible that because I'm pressing the back button quickly, that data is still being loaded in the background thread and is never released from memory?
0
[ 2, 13, 7760, 1912, 25, 52, 142, 261, 15, 2395, 9322, 800, 3726, 3726, 31, 57, 81, 1418, 9919, 18, 15, 53, 29, 21, 7354, 16, 12861, 15, 17, 14, 153, 53, 25, 21, 6036, 5318, 432, 27, 14, 5167, 14, 4155, 16527, 9, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Raised Tab Bar Item not showing "highlighted" state? === I have an Xcode project with a raised tab bar item similar to the one that Dailybooth uses. The problem is that my center Icon won't highlight to the color when touched on TestFlight but works on the iOS Simulator, any idea why?
0
[ 2, 1127, 6523, 748, 9101, 52, 3187, 13, 7, 4542, 3130, 69, 7, 146, 60, 800, 3726, 3726, 31, 57, 40, 993, 9375, 669, 29, 21, 1127, 6523, 748, 9101, 835, 20, 14, 53, 30, 1954, 10858, 96, 2027, 9, 14, 1448, 25, 30, 51, 459, 980...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
I can't stop ProgressDialog with method dismiss(); === I don't know why my code not working. I read a lot of same problems, but this is in most cases right solution, but for me is not working. My AsyncTask looks like this: public class SavingAsync extends AsyncTask<String, String, String> { private static final String TAG = "DrawView"; private ProgressDialog pd; private Context context; private File saveFile; private Bitmap bitmap; public SavingAsync(Context c, File sF, Bitmap b) { context = c; saveFile = sF; bitmap = b; } @Override protected void onPostExecute(String result) { pd.dismiss(); super.onPostExecute(result); } @Override protected void onPreExecute() { pd = new ProgressDialog(context); ProgressDialog.show(context, "", "Saving..."); super.onPreExecute(); } @Override protected String doInBackground(String... params) { OutputStream stream; try { stream = new FileOutputStream(saveFile); bitmap.compress(CompressFormat.PNG, 80, stream); stream.close(); } catch (Exception e) { e.printStackTrace(); } return null; } } Bitmap is saved sucessfully, but ProgressDialog run forever :/
0
[ 2, 31, 92, 22, 38, 747, 3455, 4286, 5567, 29, 2109, 14372, 5, 6, 73, 800, 3726, 3726, 31, 221, 22, 38, 143, 483, 51, 1797, 52, 638, 9, 31, 1302, 21, 865, 16, 205, 1716, 15, 47, 48, 25, 19, 127, 1871, 193, 4295, 15, 47, 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...
Blackmagic Decklink Interfaces for .Net === I am searching for interfaces for a decklink video device for C# .Net using DirectShowLib.Net. It seems, there are available, because they are used here: http://stackoverflow.com/questions/6355930/blackmagic-sdk-in-c-sharp Unfortunately there is no information, which library is used and the comment which ask for more information was ignored. But I don't have an idea, where to find them. Would be nice, if someone can give me an hint.
0
[ 2, 319, 21200, 4061, 6258, 6573, 18, 26, 13, 9, 2328, 800, 3726, 3726, 31, 589, 5792, 26, 6573, 18, 26, 21, 4061, 6258, 763, 3646, 26, 272, 5910, 13, 9, 2328, 568, 1744, 9303, 8326, 9, 2328, 9, 32, 2206, 15, 80, 50, 904, 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...
Low Performance with Scapy === I'm creating a script that sends to Eth0 all traffic from Tap0, and sends to Tap0 all traffic from Eth0. After finding many examples online, i managed to make it work. The issue i have is that the performance is very low. Pinging between 2 VMs without using the script, takes less than 1ms. With the script it takes ~15ms. When i send a 10 MB file from a VM to another using scp, the avg. transfer rate is 12 Mbps without the script. With the script it goes down to less than 1 Mbps. I know that Python is not actually the fastest language to deal with network traffic, but is it that slow? Is there a way to optimize this code? My VMs are Ubuntu 10.04 32 bits. Here is the code: import os,sys,getopt,struct,re,string,logging from socket import * from fcntl import ioctl from select import select from scapy.all import * TUNSETIFF = 0x400454ca IFF_TAP = 0x0002 TUNMODE = IFF_TAP ETH_IFACE = "eth0" TAP_IFACE = "tap0" conf.iface = ETH_IFACE # Here we capture frames on ETH0 s = conf.L2listen(iface = ETH_IFACE) # Open /dev/net/tun in TAP (ether) mode (create TAP0) f = os.open("/dev/net/tun", os.O_RDWR) ifs = ioctl(f, TUNSETIFF, struct.pack("16sH", "tap%d", TUNMODE)) # Speed optimization so Scapy does not have to parse payloads Ether.payload_guess=[] os.system("ifconfig eth0 0.0.0.0") os.system("ifconfig tap0 192.168.40.107") os.system("ifconfig tap0 down") os.system("ifconfig tap0 hw ether 00:0c:29:7a:52:c4") os.system("ifconfig tap0 up") eth_hwaddr = get_if_hwaddr('eth0') while 1: r = select([f,s],[],[])[0] #Monitor f(TAP0) and s(ETH0) at the same time to see if a frame came in. #Frames from TAP0 if f in r: #If TAP0 received a frame # tuntap frame max. size is 1522 (ethernet, see RFC3580) + 4 tap_frame = os.read(f,1526) tap_rcvd_frame = Ether(tap_frame[4:]) sendp(tap_rcvd_frame,verbose=0) #Send frame to ETH0 #Frames from ETH0 if s in r: #If ETH0 received a frame eth_frame = s.recv(1522) if eth_frame.src != eth_hwaddr: # Add Tun/Tap header to frame, convert to string and send. "\x00\x00\x00\x00" is a requirement when writing to tap interfaces. It is an identifier for the Kernel. eth_sent_frame = "\x00\x00\x00\x00" + str(eth_frame) os.write(f, eth_sent_frame) #Send frame to TAP0
0
[ 2, 708, 956, 29, 11583, 6448, 800, 3726, 3726, 31, 22, 79, 2936, 21, 3884, 30, 11350, 20, 13, 6268, 387, 65, 2227, 37, 5526, 387, 15, 17, 11350, 20, 5526, 387, 65, 2227, 37, 13, 6268, 387, 9, 75, 3007, 151, 3770, 2087, 15, 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...
PHP Array of Objects by Static Methods or Functions? === Say i have the following data: // Users Table +----+-------+----------+ | ID | first | last | +----+-------+----------+ | 1 | Al | Anderson | | 2 | Bob | Blakely | | 3 | Cal | Cambel | +----+-------+----------+ and the following class: // Users.php class Users { public $first; public $last; ... } I need to instantiate User objects from query results and return an array of objects. I don't know which is the better way to do this: **Static Method** Encapsulate in the class file the following pseudo-code: public static function getAll() { $myUsers = array(); ... foreach ($results as $row) { $user = new User(); ... $myUsers[] = $user; } return $myUsers; } and call it like this: $allUsers = Users::getAll(); **Regular ol' Function** Works like the static method, but maybe i could refactor to work with other objects as well... function getAll($objType='Users') { $myArray = new array(); ... return $myArray; } **WHICH IS THE BETTER WAY?** I like encapsulating it in a class function, but handling static database connection objects is more pain. I like simple "helper" function, but that just throws OOP to the wind alltogether. What do i do?
0
[ 2, 13, 26120, 7718, 16, 3916, 34, 12038, 3195, 54, 3719, 60, 800, 3726, 3726, 395, 31, 57, 14, 249, 1054, 45, 12894, 3878, 859, 2754, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 8, 8, 8, 2430, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2430, 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...
datepicker value not submitting from input to backing bean === I have a input box and datepicker. On selecting a date , it is not getting updated in the backing bean. The value is always null. On searching i found problem can be with "id" OR i may have to use onSelect(). Please suggest. <f:view> <t:div id="divid" forceId="true"><h:inputText id="date" value="#{calenderFormBean.inputValue }" /> </t:div> <h:form id="formid"> <br> <h:commandButton id="buttonid" action="#{calenderFormBean.showInputValue}" value="Show" /> </h:form> </f:view> <script type="text/javascript"> $(document).ready(function(){ $("#date").datepicker({ showOn: 'button' , buttonImageOnly: true , buttonImage: "images/icon-calendar.gif" }); }); </script> PS : i noticed the datepicker doesnot work if kept inside `<h:form>`. So i kept it as shown above. Any reason? Please suggest. Thanks for your help
0
[ 2, 1231, 16855, 106, 1923, 52, 28848, 37, 6367, 20, 3931, 15322, 800, 3726, 3726, 31, 57, 21, 6367, 1649, 17, 1231, 16855, 106, 9, 27, 20764, 21, 1231, 13, 15, 32, 25, 52, 1017, 6372, 19, 14, 3931, 15322, 9, 14, 1923, 25, 550, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 - find common elements in lists === I'm trying to write a piece of code that can automatically factor an expression. For example, if I have two lists [1,2,3,4] and [2,3,5], the code should be able to find the common elements in the two lists, [2,3], and combine the rest of the elements together in a new list, being [1,4,5]. From this post: http://stackoverflow.com/questions/3697432/python-how-to-find-list-intersection I see that the common elements can be found by set([1,2,3,4]&set([2,3,5]). Is there an easy way to retrieve non-common elements from each list, in my example being [1,4] and [5]? I can go ahead and do a for loop: lists = [[1,2,3,4],[2,3,5]] conCommon = [] common = [2,3] for elem in lists: for elem in eachList: if elem not in common: nonCommon += elem But this seems redundant and inefficient. Does Python provide any handy function that can do that? Thanks in advance!!
0
[ 2, 20059, 13, 8, 477, 757, 2065, 19, 7227, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 1855, 16, 1797, 30, 92, 7499, 3932, 40, 1803, 9, 26, 823, 15, 100, 31, 57, 81, 7227, 636, 15793, 15, 240, 15, 300, 500, 17, 636, 135,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 is my dropdown menu with Bootstrap not working? === In my Rails application, I have the following code for a dropdown menu: <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <nav> <ul class="nav pull-right"> <li><%= link_to "Home", root_path %></li> <% if signed_in? %> <li id="fat-menu" class="dropdown"> <a href="#" class="dropdown-toggle" data toggle="dropdown"> Account <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><%= link_to "Settings", edit_user_path(current_user) %></li> <li class="divider"></li> <li> <%= link_to "Sign out", signout_path, method: "delete" %> </li> </ul> </li> <% else %> <li><%= link_to "Sign in", signin_path %> <% end %> </ul> </nav> </div> </div> </header> In my application.js file I have the following code: //= require bootstrap I have no idea why the dropdown menu isn't working, and I have no idea how to fix it. A few days ago, it was working fine, and now it no longer functions properly. Thanks for any help!
0
[ 2, 483, 25, 51, 2804, 2968, 11379, 29, 5894, 16514, 52, 638, 60, 800, 3726, 3726, 19, 51, 2240, 18, 3010, 15, 31, 57, 14, 249, 1797, 26, 21, 2804, 2968, 11379, 45, 13, 1, 1743, 106, 718, 3726, 7, 18343, 1850, 16048, 1850, 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...
GCC compile codes === While compiling linux from scratch i realize that there are compile codes that appear while compiling. For example CC filename , LD filename, CC[M] filename, what do these codes mean?
0
[ 2, 489, 3384, 26561, 11358, 800, 3726, 3726, 133, 24378, 13024, 37, 12395, 31, 4007, 30, 80, 50, 26561, 11358, 30, 1893, 133, 24378, 9, 26, 823, 8093, 3893, 7259, 13, 15, 13, 6252, 3893, 7259, 15, 8093, 2558, 79, 500, 3893, 7259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I make a Google Map span 100% remaining height between header and footer? === I have set up a google map on my wordpress site here: http://drummersdatabase.com/map/ (currently set to 500px height as a temp workaround) I have managed to get the map to span 100% of the width but not the remaining height. I basically want to make sure there are no scrollbars regardless of the user's resolution. When I set the map height and/or it's containing div css (class="gridfull") 100%; it seems to interpret this as 100px instead. Any ideas how I can fix this? Thanks, Dave
0
[ 2, 184, 107, 31, 233, 21, 8144, 2942, 6289, 12849, 1846, 2947, 128, 157, 106, 17, 1749, 106, 60, 800, 3726, 3726, 31, 57, 309, 71, 21, 8144, 2942, 27, 51, 833, 5890, 689, 235, 45, 7775, 6903, 17500, 12271, 18768, 8436, 9, 960, 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...
Where can I store my data in Titanium (a nested array)? === I'm using Titanium to develop an Android app. I have a nested list of data that I'm currently storing in memory upon application startup, with `Titanium.App.Properties.setList`. I know I can encode this with JSON and store it on the phone, instead of memory. Then I can access it only when I need it. But, where do I store this JSON and how do I access it? I need "random access", since multiple places access the data. The data is readonly.
0
[ 2, 113, 92, 31, 1718, 51, 1054, 19, 26398, 13, 5, 58, 5618, 69, 7718, 6, 60, 800, 3726, 3726, 31, 22, 79, 568, 26398, 20, 2803, 40, 13005, 4865, 9, 31, 57, 21, 5618, 69, 968, 16, 1054, 30, 31, 22, 79, 871, 25615, 19, 1912, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Find Strings in Multiple Files and also which files contains that String === I am working with Hadoop and I need to find a String in around `100 files` and which files contain that String. Below is my scenario- I go to bash prompt and type like this- bash-3.00$ hadoop fs -ls /apps/hdmi-technology/b_dps/real-time And from the above command, I can see list of all the files that are there under `real-time` folder and it is like around `100 files` under `real-time folder` and each files has lot of data inside it. Below is the sample example, I am showing only two files that I will be getting by using the above command. -rw-r--r-- 3 b_dps hdmi-technology 1073741824 2012-07-18 22:50 /apps/hdmi-technology/b_dps/real-time/HADOOP_REALTIME_consolidated_RT_v1x0_20120716_aa -rw-r--r-- 3 b_dps hdmi-technology 1073741824 2012-07-18 22:50 /apps/hdmi-technology/b_dps/real-time/HADOOP_REALTIME_consolidated_RT_v1x0_20120716_ab So I need to find a String named `bcd4bc3e1380a56108f486a4fffbc8dc` in all of the files under `real-time` folder and also which files contains that `String`. And If I can find which files contains that `String`, then I can go manually into each file and find that particular `String`, but the challenge for me is to find which files actually contains that `String` `bcd4bc3e1380a56108f486a4fffbc8dc`. Hope I am clear to everyone. Any help will be appreciated.
0
[ 2, 477, 7887, 19, 1886, 6488, 17, 67, 56, 6488, 1588, 30, 3724, 800, 3726, 3726, 31, 589, 638, 29, 41, 21709, 17, 31, 376, 20, 477, 21, 3724, 19, 140, 13, 1, 4031, 6488, 1, 17, 56, 6488, 3717, 30, 3724, 9, 1021, 25, 51, 1270...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Updating a Git Repository === What is the proper terminal command to update a Git hub repository who's files are stored locally on my MAC machine?
0
[ 2, 71, 43, 1880, 21, 13, 10404, 24869, 800, 3726, 3726, 98, 25, 14, 4119, 3855, 1202, 20, 11100, 21, 13, 10404, 5814, 24869, 72, 22, 18, 6488, 50, 8214, 6680, 27, 51, 1572, 1940, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to concatenate an absolute path and relative path with QDir? === I have a relative path and absolute path that look something like this: <pre> Absolute: /tmp/somedir Relative: anotherdir/file.txt </pre> I would like to concatenate the two (`/tmp/somedir/anotherdir/file.txt`) with [QDir](http://qt-project.org/doc/qt-5.0/qdir.html) but I am not quite sure what the proper way of doing that is. According to the documentation for [`QDir::absoluteFilePath`](http://qt-project.org/doc/qt-5.0/qdir.html#absoluteFilePath): > "Returns the absolute path name of a file in the directory." This would be ideal if all I had was a filename, but I have a relative path as well. I looked at some of the other functions on the page, but none of them seemed to be what I was looking for. What function should I be using?
0
[ 2, 184, 20, 1065, 9530, 8820, 40, 7070, 2013, 17, 4543, 2013, 29, 2593, 9035, 60, 800, 3726, 3726, 31, 57, 21, 4543, 2013, 17, 7070, 2013, 30, 361, 301, 101, 48, 45, 13, 1, 3515, 1, 7070, 45, 13, 118, 38, 2554, 118, 3220, 9035...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 use __DATE__ and __TIME__ predefined macros in as two integers, then stringify? === Want to use **__ DATE __ and __ TIME __** as integer for giving automated version to my code in compile time. #define STRINGIZER(arg) #arg #define STR_VALUE(arg) STRINGIZER(arg) #define DATE_as_int_str useD(__DATE__) // What can be done ? #define TIME_as_int_str useT(__TIME__) // What can be done ? #define _VERSION_ 1.4 #define COMPLETE_VERSION STR_VALUE(_VERSION_) "." DATE_as_int_str "." TIME_as_int_str and get `COMPLETE_VERSION` as string in a `const unsigned char []`. const unsigned char completeVersion[] = ?? COMPLETE_VERSION; Should output **1.4.1432.2234** something. One of the possible solution could be but did not work: [ convert-__date__-to-unsigned-int ][1] In context of compile time [ convertint-date-and-time-string-to-just-integers-in-c ][3] One can refer [ expanssion-and-stringification-how-to-get-the-marco-name-not-its-value ][2] [1]: http://www.velocityreviews.com/forums/t316565-convert-__date__-to-unsigned-int.html [2]: http://stackoverflow.com/questions/11693219/macro-expanssion-and-stringification-how-to-get-the-marco-name-not-its-value/11694231#11694231 [3]: http://stackoverflow.com/questions/11204853/convertint-date-and-time-string-to-just-integers-in-c
0
[ 2, 184, 20, 275, 13, 1, 8209, 1, 17, 13, 1, 891, 1, 782, 13439, 9069, 18, 19, 28, 81, 13820, 18, 15, 94, 3724, 8612, 60, 800, 3726, 3726, 259, 20, 275, 13, 1409, 1, 1231, 13, 1, 17, 13, 1, 85, 13, 1, 1409, 28, 13820, 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...
jQuery submit function not triggered === I have a form <form id="solicitud" action="ventas.php?content=nuevo" method="post"> ... </form> Then I have to submit my submit using jQuery but I can't get it working $("#nombres").click(function(){ alert('clicked'); $("form").submit(function(event){ event.preventDefault(); }); }); The alert function is called but my form isn't submited, what am i doing wrong?
0
[ 2, 487, 8190, 93, 12298, 1990, 52, 15164, 800, 3726, 3726, 31, 57, 21, 505, 13, 1, 4190, 4924, 3726, 7, 18, 18156, 12866, 43, 7, 1028, 3726, 7, 6645, 472, 9, 26120, 60, 25424, 3726, 4215, 11190, 7, 2109, 3726, 7, 6962, 7, 1, 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...
anroid NFC card emulation / send specified commands to reader === I'm searching for a way to send specific commands from my phone to a reader. I have already read that card emulation is not supported on android due to securtiy reasons, but it is possible via a firmware patch for android 2.3.4 on the Nexus S. My main question is, do I really need card emulation to send defined APDUs to the reader and to recieve the answer APDUs or is there any other posibility maybe by misusing android Beam? If I need to use card emulation are there any new insights? The last posts (see links) I found are nearly one year old... As adiditional information in the end I will not have any control over the reader. Thanks for answering and on any new insights on card emulation. --links-- firmware patch: [xda-developers](http://forum.xda-developers.com/showthread.php?t=1281946) stackoverflow questions: [NFC mobile devolepment](http://stackoverflow.com/questions/6992869/android-and-symbian-nfc-mobile-development-questions-and-answers-faq/7595889) [NFC card emulation](http://stackoverflow.com/questions/6611810/nfc-card-emulation-android/6690356)
0
[ 2, 40, 18524, 25161, 2056, 3579, 11123, 13, 118, 2660, 9931, 14294, 20, 7765, 800, 3726, 3726, 31, 22, 79, 5792, 26, 21, 161, 20, 2660, 1903, 14294, 37, 51, 1132, 20, 21, 7765, 9, 31, 57, 614, 1302, 30, 2056, 3579, 11123, 25, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Using pip within a python script === I am writing a utility in python that needs to check for (and if necessary, install and even upgrade) various other modules with in a target project/virtualenv, based on user supplied flags and/or input. I am currently trying to utilize 'pip' directly/programatically (because of it's existing support for the various repo types I will need to access), but I am having difficulty in finding examples or documentation on using it this way. This seemed like the direction to go: import pip vcs = pip.vcs.VersionControl(url="http://path/to/repo/") ...but it gives no joy. I need help with some of the basics aparently - like how can I use pip to pull/export a copy of an svn repo into a given local directory. Ultimately, I will also need to use it for git and mercurial checkouts as well as standard pypi installs. Any links, docs or pointers would be much appreciated.
0
[ 2, 568, 11280, 363, 21, 20059, 3884, 800, 3726, 3726, 31, 589, 1174, 21, 10082, 19, 20059, 30, 2274, 20, 2631, 26, 13, 5, 290, 100, 2378, 15, 16146, 17, 166, 9483, 6, 617, 89, 17113, 29, 19, 21, 2935, 669, 118, 8145, 2473, 4482,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
I cant understand this nullpointer exception === Im learning android and I've done a custom control and when I put it in a Layout it works ok, I put it in this way in itemduplicados.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <com.android.customViews.CtlDuplicado android:id="@+id/dupCancion" android:layout_width="match_parent" android:layout_height="match_parent"/> </LinearLayout> Then I want to do a list of many of this controls, so I use a listview in listadoduplicados.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LstListadoDuplicados" android:layout_width="match_parent" android:layout_height="match_parent" > </ListView> </LinearLayout> A Activity for this with a onCreate: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.listadoduplicados); AdaptDuplicados adapter = new AdaptDuplicados(this, Deduplicator.deduplicate()); final ListView lstDuplicados = (ListView) findViewById(R.id.LstListadoDuplicados); lstDuplicados.setAdapter(adapter); lstDuplicados.setVisibility(View.VISIBLE); } And then a class that extends arrayadapter to populate the listview with ctlduplicados: public AdaptDuplicados(Activity context, ArrayList<Duplicado> datos) { super(context, R.layout.itemduplicado, datos); this.context = context; this.datos = datos; } public View getView(int position, View convertView, ViewGroup parent) { View item = convertView; DuplicadoViewHolder dvh; if (item == null){ LayoutInflater li = context.getLayoutInflater(); item = li.inflate(R.layout.itemduplicado, null); dvh = new DuplicadoViewHolder(); dvh.duplicado = (CtlDuplicado)item.findViewById(R.id.dupCancion); item.setTag(item); }else{ dvh = (DuplicadoViewHolder)item.getTag(); } dvh.duplicado.setCanciones(datos.get(position));//here is the nullpointerexception cause duplicado is null return (item); } Well, the I have a nullpointerexception cause dvh.duplicado is null. Debbuging in eclipse I see that in the line item = li.inflate(R.layout.itemduplicado, null); the item is created and item contains a CtlDuplicado well created in an internal array called mChilds, but when I get item.findViewById(R.id.dupCancion) it returns null... The R.id.dupCancion is defined in projects R. Some one can give me any clue of what is happening? Thanks
0
[ 2, 31, 2973, 1369, 48, 16203, 3132, 106, 5391, 800, 3726, 3726, 797, 2477, 13005, 17, 31, 22, 195, 677, 21, 5816, 569, 17, 76, 31, 442, 32, 19, 21, 9106, 32, 693, 5854, 15, 31, 442, 32, 19, 48, 161, 19, 9101, 2323, 25971, 8609...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ASP GridView change through pagination === Hey this is my scenario. I have a result set in an ASP GridView presented on a webpage. The GridView is displayed on a screen for viewing by a team that needs to see the information. However, there is a lot of rows to display, so I have enabled auto paging to keep the results on each page...is there a way to automatically change through the pagination? Thanks
0
[ 2, 28, 306, 7354, 4725, 753, 120, 19006, 108, 857, 800, 3726, 3726, 8409, 48, 25, 51, 12705, 9, 31, 57, 21, 829, 309, 19, 40, 28, 306, 7354, 4725, 1831, 27, 21, 2741, 6486, 9, 14, 7354, 4725, 25, 6115, 27, 21, 2324, 26, 11244,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
requiredfieldvalidator clashing with formview === can anyone help me with out ? When i put requiredfieldvalidator on my create event's tabcontainer, i cannot update my formview which is on another tab >>> edit event's tab. I have totally no idea what happen, and as i trial and error, i found that the requiredfieldvalidator is the one that cause my formview to stop updating into my database. AND i this requiredfieldvalidator is on another tab, so how did it affect ?!?!? Please be specified or show e.g as I am REALLY REALLY NEW AND BAD ! Here is the code >>> <asp:TextBox ID="tb_eventName" runat="server" ValidationGroup="vg"></asp:TextBox> </td> <td> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_eventName" ErrorMessage="Enter event" ForeColor="Red" ValidationGroup="vg" SetFocusOnError="True" >*</asp:RequiredFieldValidator> <EditItemTemplate> ID: <asp:Label ID="eventIDLabel1" runat="server" Text='<%# Eval("eventID") %>' /> <br /> <br /> Name:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <asp:TextBox ID="eventNameTextBox" runat="server" Text='<%# Bind("eventName") %>' /> &nbsp&nbsp <br /> <br /> Date:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <asp:TextBox ID="eventDateTextBox" runat="server" Text='<%# Bind("eventDate") %>' /> <br /> <br /> Start-Time:&nbsp <asp:TextBox ID="eventStartTimeTextBox" runat="server" Text='<%# Bind("eventStartTime") %>' /> <br /> <br /> End-Time:&nbsp&nbsp&nbsp <asp:TextBox ID="eventEndTimeTextBox" runat="server" Text='<%# Bind("eventEndTime") %>' /> <br /> <br /> Location:&nbsp&nbsp&nbsp&nbsp&nbsp <asp:TextBox ID="eventLocationTextBox" runat="server" Text='<%# Bind("eventLocation") %>' /> <br /> <br /> Email:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <asp:TextBox ID="eventEmailTextBox" runat="server" Text='<%# Bind("eventEmail") %>' /> <br /> <br /> Contact No:&nbsp <asp:TextBox ID="eventContactNoTextBox" runat="server" Text='<%# Bind("eventContactNo") %>' /> <br /> <br /> Description: <asp:TextBox ID="eventDescriptionTextBox" runat="server" Text='<%# Bind("eventDescription") %>' /> <br /> <br /> Image:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <asp:TextBox ID="eventImageTextBox" runat="server" Text='<%# Bind("eventImage") %>' /> <br /> <br /> <asp:LinkButton ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
0
[ 2, 1390, 1109, 18506, 43, 3457, 13870, 68, 29, 505, 4725, 800, 3726, 3726, 92, 1276, 448, 55, 29, 70, 13, 60, 76, 31, 442, 1390, 1109, 18506, 43, 3457, 27, 51, 1600, 807, 22, 18, 6523, 1126, 5851, 106, 15, 31, 1967, 11100, 51, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Mediawiki: How do I use shortcode outside of main content box? === I'm trying to link to a template (e.g. {{Example}}) from within the template file. Any help would be appreciated.
2
[ 2, 941, 17375, 45, 184, 107, 31, 275, 502, 9375, 719, 16, 407, 2331, 1649, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 3508, 20, 21, 22894, 13, 5, 62, 9, 263, 9, 13, 1, 29041, 1, 6, 37, 363, 14, 22894, 3893, 9, 186, 448, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I delete duplicate values with group by === Example database : ID StudentName StudentClass 1 John A 2 John B 3 Peter A 4 John A 5 John B I want the result should be ID StudentName StudentClass 1 John A 2 John B 3 Peter A Statment DELETE FROM Student WHERE ID NOT IN (SELECT * FROM (SELECT MIN(n.ID) FROM Student n GROUP BY n.StudentName) x) How do I keep **John** name on class **A & B**?
0
[ 2, 184, 107, 31, 27448, 19429, 4070, 29, 214, 34, 800, 3726, 3726, 823, 6018, 13, 45, 4924, 1209, 7259, 1209, 1898, 137, 239, 21, 172, 239, 334, 203, 936, 21, 268, 239, 21, 331, 239, 334, 31, 259, 14, 829, 378, 44, 4924, 1209, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 pulling the selected item in an HTML dropdown that is populated from an array to pass in to the database === Ok, fist off I apologize for the convoluted and overly long title, but I am very new to all of this and I wasn't quite sure how to explain it or even begin...so I just did! What I am doing right now is populating an HTML dropdown list from my MySQL database, and then I would like to take whichever option the user selects from the dropdown and somehow enter that data into a different table. The code I am using to get the data from the table is: <td>Model of Bike</td> <td><select type ="text" name="bikeBrand"> <?php $sql = mysql_query("SELECT bikeDescr, bikeID FROM Bikes"); while ($row = mysql_fetch_array($sql)) { echo "<option value='bikeDescr'>" . $row['bikeDescr'] . "</option>"; } ?> Now once the user selects the desired bike, let's say that it is a Trek, I want to be able to get that information and put it into my Insert into () Values () so that I may track which bike they have selected each time a new ticket is created. Hopefully I have not confused or made the matter worse, but any help as to what I need to do, or where to look would be much appreciated. Thanks for your time.
0
[ 2, 13, 26120, 3303, 14, 1704, 9101, 19, 40, 13, 15895, 2804, 2968, 30, 25, 11111, 37, 40, 7718, 20, 1477, 19, 20, 14, 6018, 800, 3726, 3726, 5854, 15, 5499, 168, 31, 12059, 26, 14, 1065, 16261, 1427, 17, 18234, 175, 581, 15, 47,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Integer casting in big-endian === In a big-endian machine, if I have a `long` variable and cast it to a `char`, does the language specification guarantees I will get the least significant bits after the cast? In other words: long a = 50; char b = (char)a; assert(b == 50); /* Is it true? */ I know this is true for little-endian machines, but what about big-endian?
0
[ 2, 13820, 9087, 19, 580, 8, 2451, 806, 800, 3726, 3726, 19, 21, 580, 8, 2451, 806, 1940, 15, 100, 31, 57, 21, 13, 1, 2701, 1, 7612, 17, 1325, 32, 20, 21, 13, 1, 5433, 1, 15, 630, 14, 816, 14177, 9120, 18, 31, 129, 164, 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...
How do I make an element appear with javascript without overriding style? === I have the following code to display a div that was previously hidden: document.getElementById('theDiv').style.display = 'block'; The problem is that when I execute this, the div loses all prior CSS formatting. Is there a way that I can have this same functionality while keeping my CSS formatting?
3
[ 2, 184, 107, 31, 233, 40, 4520, 1893, 29, 8247, 8741, 366, 84, 5175, 68, 1034, 60, 800, 3726, 3726, 31, 57, 14, 249, 1797, 20, 3042, 21, 13, 12916, 30, 23, 1343, 3689, 45, 4492, 9, 3060, 27567, 779, 1340, 5, 22, 124, 12916, 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...
Why does adding items to an Adapter in bulk interfere with ListView's normal transcript mode? === Ordinarily, a ListView set to normal transcript mode snaps the scroll to the bottom of the screen when a new item is added to the Adapter if the last item in the list was already on screen. When only adding one item at a time, normal transcript mode works as expected. However, when adding multiple items at a time, the ListView no longer scrolls to the bottom automatically as one would expect. Consider the following code. It was written strictly to demonstrate this behavior and serves no practical purpose. First we define a layout file for our project that only contains a full screen ListView: <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list" android:layout_height="match_parent" android:layout_width="match_parent" /> We then create the following ListActivity. Every 2 seconds it adds 10 new numbered items in bulk to the Adapter. import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import android.app.ListActivity; import android.os.Bundle; import android.widget.AbsListView; import android.widget.ArrayAdapter; public class MainActivity extends ListActivity { AtomicInteger ai = new AtomicInteger(1); ArrayAdapter<Integer> mAdapter; ScheduledExecutorService ex = Executors.newSingleThreadScheduledExecutor(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mAdapter = new ArrayAdapter<Integer>(this, android.R.layout.simple_list_item_1); getListView().setAdapter(mAdapter); getListView().setTranscriptMode(AbsListView.TRANSCRIPT_MODE_NORMAL); ex.scheduleAtFixedRate(postToList, 2, 2, TimeUnit.SECONDS); } Runnable postToList = new Runnable() { public void run() { final Integer[] ints = new Integer[10]; for(int i=0; i<ints.length; i++) { ints[i] = ai.getAndIncrement(); } runOnUiThread(new Runnable() { public void run() { for(Integer i : ints) { mAdapter.add(i); } } }); } }; } There are ways to force the ListView to automatically jump down, but the ones I've seen so far involve manually handling check for the last item on screen and calling setSelection(). This isn't ideal because the list selection is moved to the last item on screen each time something new comes in, which is extremely annoying to a user who isn't interacting with a touch screen. As far as I can tell, this is a bug that was fixed in ICS, but still occurs in Gingerbread and earlier versions of Android. I would like to know why this strange behavior occurs and if there is any way to get the ListView to behave like it should without the previously mentioned workarounds. Thanks in advance!
0
[ 2, 483, 630, 4721, 3755, 20, 40, 9924, 106, 19, 7238, 12668, 29, 968, 4725, 22, 18, 1826, 18413, 3740, 60, 800, 3726, 3726, 54, 3653, 18966, 15, 21, 968, 4725, 309, 20, 1826, 18413, 3740, 6877, 18, 14, 12159, 20, 14, 2129, 16, 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...
Why am I able to use a method name instead of a delegate in this argument? === public delegate void HandlerDelegate(int val); public class Process { public static void Execute(HandlerDelegate del) { del(5); } } class Program { static void Main(string[] args) { //HandlerDelegate handler = Task; normally I would do this first Process.Execute(Task); // but this works - how? } public static void Task(int val) { Console.WriteLine(val); } } I understand that a delegate is a reference to a method, but how am I able to pass what looks like a method name to a method that accepts a delegate as its argument?
0
[ 2, 483, 589, 31, 777, 20, 275, 21, 2109, 204, 700, 16, 21, 11300, 19, 48, 5476, 60, 800, 3726, 3726, 317, 11300, 11364, 24641, 24249, 3322, 5, 6391, 3347, 6, 73, 317, 718, 953, 13, 1, 317, 12038, 11364, 15644, 5, 3203, 1252, 242...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 faster way or optimization I can apply to my improvised memory pool? === I have a couple different objects that allocate certain objects to communicate with each other and I decided to give them each a locally managed memory pool where a node can be tagged as free merely by setting a flag within it. The idea is like this: struct cat {/**couple data fields*/}; struct rat { rat() : poolIndex_(0), poolSize_(INITIAL_SIZE), pool_(new cat *[poolSize_]) { for (size_t i = 0; i < poolSize_; ++i) pool_[i] = new cat; } size_t poolIndex_; size_t poolSize_; cat** pool_; }; I provide a non-member function for `rat` and his friends to resize their pool whenever they run out of free `cat` nodes (giving out the nodes is done via `poolIndex_++ % poolSize_;`). The non-member function is as follows: void quadruplePool(cat*** pool, size_t& poolIndex, size_t& poolSize) { poolIndex = poolSize; cat** tmp = new cat *[poolSize*4]; for (size_t i = 0; i < poolSize; ++i) tmp[i] = (*pool)[i]; delete[] (*pool); (*pool) = tmp; poolSize = poolSize*4; for (size_t i = poolIndex; i < poolSize; ++i) (*pool)[i] = new cat; } is there something in the code which could give me a speedup from what I have right now? (Speed is by far critical for me)
0
[ 2, 25, 80, 21, 4233, 161, 54, 21597, 31, 92, 5645, 20, 51, 23280, 1912, 3067, 60, 800, 3726, 3726, 31, 57, 21, 1335, 421, 3916, 30, 65, 111, 9530, 1200, 3916, 20, 8709, 29, 206, 89, 17, 31, 868, 20, 590, 105, 206, 21, 6680, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 call script abort safely on intentional infinite loop === I have a Python script; file decoder/parser that keeps listening (execute method: LiveParse()). I've made a stop property like this in the Class stop = False LiveParse() just keeps calling itself to keep searching for new files and parse them if needed. This processed data will then be written to a output file. So what I basically do is this: def LiveParser(self, code, value): if self.stop == True: return False // Here's all the code to process the files // Keep looping time.sleep(3) self.LiveParser() I don't need to call sys.exit() perse, because when the LiveParser() function returns False, the code will just reach it's end and exit automatically. At the moment I do CTRL+C to cancel the script in my Terminal, but I find this ugly and was wondering if there is a multi-platform solution (the script is for Linux/OSX/Windows) to call some other Key(-combination) that the script can catch and bind it to execute a Method to alter the "self.stop" property to "True". Of course for all 3 platforms it's hard to bypass any reserved Key-combinations. But I can test that out later in the virtual machines for Windows and Linux (running on OSX atm).
0
[ 2, 20059, 645, 3884, 21557, 9817, 27, 5140, 192, 9698, 5293, 800, 3726, 3726, 31, 57, 21, 20059, 3884, 73, 3893, 12015, 1157, 118, 3574, 4104, 30, 8968, 4948, 13, 5, 1706, 17194, 591, 2109, 45, 515, 3574, 870, 5, 6, 6, 9, 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...
Reading text format from Excel using Microsoft.Office.Interop.Excel === I am trying to read text format e.g. the Strikethough property via myworksheet.Cells[row, col].DisplayFormat.Style.Font.Strikethrough; However, the result is always false, not matter what the actual formatting is. Right before that, I read the value of the same cell using: myworksheet.Cells[row, col].Value; And get the correct value. When I try using the debugger to read `myworksheet.Cells[row, col].DisplayFormat.Style.Font.Strikethrough` I receive false. When I try using the debugger to read the format's `Font` and see its properties I get: ![screenshot][1] Exception details: <code>Strikethrough {System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Dynamic.IDispatchComObject.GetMembers(IEnumerable`1 names)} System.Reflection.TargetInvocationException</code> [1]: http://i.stack.imgur.com/AbC6i.png I have Office 2010 x86 installed on a Windows 7 SP1 x64 OS and I'm referencing Microsoft.Office.Interop.Excel version 14 from a .NET 4.0 project. I created the .xlsx file programmatically using the same library and added the text formatting manually via Excel's UI. The exception thrown by the access via debugger (watch and immediate) hints that the library version may be out of date, however, version 14 seems to be the correct version (http://www.microsoft.com/en-us/download/details.aspx?id=3508). What am I missing?
0
[ 2, 1876, 1854, 2595, 37, 20700, 568, 7099, 9, 17047, 9, 6280, 2594, 9, 1706, 11040, 800, 3726, 3726, 31, 589, 749, 20, 1302, 1854, 2595, 13, 62, 9, 263, 9, 14, 3333, 9371, 1354, 1197, 51, 3783, 17627, 9, 9725, 18, 2558, 5417, 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...
Registering _set_purecall_handler function using P/Invoke in C# === I'm having trouble using [_set_purecall_handler][1] with P/Invoke in C#. Basically, this works: **(C++)** _set_purecall_handler(MyPureCallHandler); void MyPureCallHandler(void) { // gets called } But this doesn’t: **(C#)** [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void PureCallHandler(); [DllImport("msvcr100.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr _set_purecall_handler([MarshalAs(UnmanagedType.FunctionPtr)] PureCallHandler handler); _set_purecall_handler(MyPureCallHandler); private void MyPureCallHandler() { // *** doesn’t get called *** } I’m not sure if my P/Invoke method signature is correct, but it doesn't throw any errors when I call the function (it just doesn't fire the callback on a pure virtual call error). **Background** We have a number of apps (C++, C++/CLI and C#) that use a single C# library for catching exceptions. This registers various handlers (AppDomain.CurrentDomain.UnhandledException, SetUnhandledExceptionFilter, etc) and catches most exceptions. However, it doesn't catch pure virtual call errors and so we need to register the above function. [1]: http://msdn.microsoft.com/en-us/library/t296ys27%28v=vs.80%29.aspx
0
[ 2, 2243, 68, 13, 1, 3554, 1, 21059, 9200, 1, 3203, 1252, 1990, 568, 351, 118, 108, 2625, 1048, 19, 272, 5910, 800, 3726, 3726, 31, 22, 79, 452, 2572, 568, 636, 1, 3554, 1, 21059, 9200, 1, 3203, 1252, 500, 2558, 165, 500, 29, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Twitter bootstrap - list of widgets / panels that can scroll horizontally === What would be the ideal way to implement: 1. A list of widgets / panels . I am looking for widgets like in iGoogle or [heft.me][1]. A possible solution would be to use the css from the heft.me site, but I would like to know if there is a twitter bootstrap way of doing it or are there any extensions available ? 2. Once I achieve rendering widgets, I will be adding widgets dynamically. I would like these widgets to be horizontally scrollable. One possible solution is that I should tweak the carousel plugin that comes with twitter-bootstrap, but again I would like to know if there is a better way ? 3. Will it be advisable to maintain a list of horizontal scrolling widgets for smaller devices like mobile phones or is better to render them differently on mobile devices, may be accordion panels or something of that sort ? BTW I am using twitter-bootstrap 2.0.4 [1]: http://heft.me/
0
[ 2, 10623, 5894, 16514, 13, 8, 968, 16, 4807, 43, 3060, 18, 13, 118, 9449, 30, 92, 12159, 25658, 800, 3726, 3726, 98, 83, 44, 14, 5628, 161, 20, 8713, 45, 137, 9, 21, 968, 16, 4807, 43, 3060, 18, 13, 118, 9449, 13, 9, 31, 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...
OneFingerRotationGesture make changes to 270' and update text display in 2 xib Objective-c === I use OneFingerRotationGestureRecognizer and OneFingerRotationGestureController from :http://blog.mellenthin.de/archives/2012/02/13/an-one-finger-rotation-gesture-recognizer/ I want to make some changes in this code. I want to change 360 angle to 270 and block when it >270 and less <0. This is the code of OneFingerRotationGestureRecognizer.m: // // CircularGestureRecognizer.m // #include <math.h> #import "OneFingerRotationGestureRecognizer.h" @implementation OneFingerRotationGestureRecognizer // private helper functions CGFloat distanceBetweenPoints(CGPoint point1, CGPoint point2); CGFloat angleBetweenLinesInDegrees(CGPoint beginLineA, CGPoint endLineA, CGPoint beginLineB, CGPoint endLineB); - (id) initWithMidPoint: (CGPoint) _midPoint innerRadius: (CGFloat) _innerRadius outerRadius: (CGFloat) _outerRadius target: (id <OneFingerRotationGestureRecognizerDelegate>) _target { if ((self = [super initWithTarget: _target action: nil])) { midPoint = _midPoint; innerRadius = _innerRadius; outerRadius = _outerRadius; target = _target; } return self; } /** Calculates the distance between point1 and point 2. */ CGFloat distanceBetweenPoints(CGPoint point1, CGPoint point2) { CGFloat dx = point1.x - point2.x; CGFloat dy = point1.y - point2.y; return sqrt(dx*dx + dy*dy); } CGFloat angleBetweenLinesInDegrees(CGPoint beginLineA, CGPoint endLineA, CGPoint beginLineB, CGPoint endLineB) { CGFloat a = endLineA.x - beginLineA.x; CGFloat b = endLineA.y - beginLineA.y; CGFloat c = endLineB.x - beginLineB.x; CGFloat d = endLineB.y - beginLineB.y; CGFloat atanA = atan2(a, b); CGFloat atanB = atan2(c, d); // convert radiants to degrees return (atanA - atanB) * 180 / M_PI; } #pragma mark - UIGestureRecognizer implementation - (void)reset { [super reset]; cumulatedAngle = 0; } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; if ([touches count] != 1) { self.state = UIGestureRecognizerStateFailed; return; } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; if (self.state == UIGestureRecognizerStateFailed) return; CGPoint nowPoint = [[touches anyObject] locationInView: self.view]; CGPoint prevPoint = [[touches anyObject] previousLocationInView: self.view]; // make sure the new point is within the area CGFloat distance = distanceBetweenPoints(midPoint, nowPoint); if ( innerRadius <= distance && distance <= outerRadius) { // calculate rotation angle between two points CGFloat angle = angleBetweenLinesInDegrees(midPoint, prevPoint, midPoint, nowPoint); // fix value, if the 12 o'clock position is between prevPoint and nowPoint if (angle > 180) { angle -= 360; } else if (angle < -180) { angle += 360; } // sum up single steps cumulatedAngle += angle; // call delegate if ([target respondsToSelector: @selector(rotation:)]) { [target rotation:angle]; } } else { // finger moved outside the area self.state = UIGestureRecognizerStateFailed; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesEnded:touches withEvent:event]; if (self.state == UIGestureRecognizerStatePossible) { self.state = UIGestureRecognizerStateRecognized; if ([target respondsToSelector: @selector(finalAngle:)]) { [target finalAngle:cumulatedAngle]; } if ([target respondsToSelector: @selector(finalAngle_osw::)]) { [target finalAngle_osw:cumulatedAngle]; } } else { self.state = UIGestureRecognizerStateFailed; } cumulatedAngle = 0; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesCancelled:touches withEvent:event]; self.state = UIGestureRecognizerStateFailed; cumulatedAngle = 0; } @end Any ideas, thanks
0
[ 2, 53, 18485, 661, 8593, 5133, 6418, 233, 1693, 20, 13, 13710, 22, 17, 11100, 1854, 3042, 19, 172, 5641, 220, 7038, 8, 150, 800, 3726, 3726, 31, 275, 53, 18485, 661, 8593, 5133, 6418, 14673, 22007, 3592, 17, 53, 18485, 661, 8593, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...