unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
override variables from other classes === Say i have a variable in a general `Global.as` file like this: public static const test:String = "testString"; And in another file i want to override that variable. like following perhaps: In `File1.as` : override var test:String = "testStringUpdated"; Ofcourse this isnt working. Does anyone know how to do this? Is it actually possible with `override` and is `override` suposed to be used like this? Or is it only for overriding functions? Thanks in advance.
0
[ 2, 84, 11891, 12157, 37, 89, 2684, 800, 3726, 3726, 395, 31, 57, 21, 7612, 19, 21, 297, 13, 1, 26763, 9, 472, 1, 3893, 101, 48, 45, 317, 12038, 11608, 38, 1289, 45, 11130, 800, 13, 7, 10543, 11130, 7, 73, 17, 19, 226, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
changing dynamically the "onlink" id in css === I made a navigation bar as tabs in my website, and I used the onlink identity to specify the current tab with certain characteristics. My problem is that when I change tabs, I don't know how to make the previous tab id set as none and the current one set as onlink. Here's the navigation bar code: <div id="indNavBar"> <div id="indHolder"> <ul> <li><a onclick="DisplayDIV('IndPage');HideDIV('DoubleInd');putOnlink('IndPage');" id="onlink">Single Indicator</a></li> <li><a onclick="DisplayDIV('DoubleInd');HideDIV('IndPage');">Double Indicators</a></li> </ul> </div> </div> There's a simple ways but it's somehow stupid, which is to make each current tab as a whole page and when I click another tab, it's just given the url of clicked tab which goes to the page with specified onlink id, but this requires reloading the whole page that's why I'm seeking a better solution.
0
[ 2, 4226, 7782, 1326, 14, 13, 7, 218, 6258, 7, 4924, 19, 272, 18, 18, 800, 3726, 3726, 31, 117, 21, 8368, 748, 28, 6523, 18, 19, 51, 2271, 15, 17, 31, 147, 14, 27, 6258, 3270, 20, 19077, 14, 866, 6523, 29, 1200, 5626, 9, 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...
How to make BalloonPopupExtender works with Tab key from the keyboard? === I am a new ASP.NET developer and trying to use ASP.NET Ajax BallouPopupExtender with the form that I have. I wrote the code and it works well but what I want now is the following: I have 4 TextBoxs aligned besides each other. Now the Ajax BalloonPopupExtender control will only work if the user clicks on each TextBox using the mouse. However, if the users uses the Tab key from his keyboard to fill these TextBoxs, this BalloonPopupExtender will not be appeared. **So how to make it works with Tab key?** My Code: <ajaxToolkit:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" TargetControlID="CorrectAnswerTextBox" BalloonPopupControlID="pnlBallon" Position="BottomRight" BalloonStyle="Cloud" BalloonSize="Small" CustomCssUrl="ballonPopupStyle" CustomClassName="oval" UseShadow="true" ScrollBars="Auto" DisplayOnMouseOver="true" DisplayOnFocus="false" DisplayOnClick="true"> </ajaxToolkit:BalloonPopupExtender> <asp:Panel ID="pnlBallon" runat="server"> Test TEST </asp:Panel>
0
[ 2, 184, 20, 233, 10876, 6057, 576, 1706, 38, 13630, 693, 29, 6523, 1246, 37, 14, 8896, 60, 800, 3726, 3726, 31, 589, 21, 78, 28, 306, 9, 2328, 10058, 17, 749, 20, 275, 28, 306, 9, 2328, 20624, 1592, 2655, 6057, 576, 1706, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 validation of a select box === I'd would like to use the jquery validation plugin to validate and ensure that the user selects an option. I know that it's working if you leave the first option value blank like this : <select id="jungle" name="jungle" title="Please select something!" validate="required:true"> <option value=""></option> <option value="1">Buga</option> <option value="2">Baga</option> <option value="3">Oi</option> </select> But I need a solution where I can have the value of the first option not blank as it needs to be filled dynamically. e.g. <select id="jungle" name="jungle" title="Please select something!" validate="required:true"> <option value="default"></option> <option value="1">Buga</option> <option value="2">Baga</option> <option value="3">Oi</option> </select> Does anybody knows how to customize the default validation to have this working ?
0
[ 2, 487, 8190, 93, 27999, 16, 21, 5407, 1649, 800, 3726, 3726, 31, 22, 43, 83, 101, 20, 275, 14, 487, 8190, 93, 27999, 10922, 108, 20, 7394, 1373, 17, 4062, 30, 14, 4155, 5407, 18, 40, 4255, 9, 31, 143, 30, 32, 22, 18, 638, 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...
Amazon s3 file upload confusion === I'm using com.amazonaws.services.s3.AmazonS3 to upload files from my server to amazon's one. Everything is working perfectly but I'm going crazy because of an issue: I am uploading several files and folders (mostly images, js and css files). The files get uploaded nicely however I have one particular css file (jquery-mobile-1.0.1.css) that gets uploaded however when an html relies on that file, the css is not loaded, until I go and manually upload that one file again and make it public. I literally tried everything (changed file name, location, encoding) but nothing seems to be working. Does anyone have an idea what can cause the problem? The files are uploaded dynamically, so the way that the particular css file gets uploaded does not differ from other css files. Any help is appreciated.
0
[ 2, 8059, 13, 18, 240, 3893, 71, 8294, 5677, 800, 3726, 3726, 31, 22, 79, 568, 13, 960, 9, 3812, 22720, 10268, 9, 11449, 18, 9, 18, 240, 9, 3812, 6931, 18, 240, 20, 71, 8294, 6488, 37, 51, 8128, 20, 8059, 22, 18, 53, 9, 796, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 run mongod command after got pymongo installed from pip === I'm running a virtualenv on osx 10.7.4, and I was trying to install MongoDB for python, which is version 2.7.3. I just installed it from pip, and am trying to see what happens if I run mongod command, but it turns out I can't run the command. Below is what happened in my terminal, could anyone give a hand here about what could be wrong? (test1)Dus-MacBook-Air:~ mepine$ pip install pymongo Downloading/unpacking pymongo Downloading pymongo-2.2.1.tar.gz (230Kb): 230Kb downloaded Running setup.py egg_info for package pymongo Installing collected packages: pymongo Running setup.py install for pymongo building 'bson._cbson' extension /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c bson/_cbsonmodule.c -o build/temp.macosx-10.4-x86_64-2.7/bson/_cbsonmodule.o /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c bson/time64.c -o build/temp.macosx-10.4-x86_64-2.7/bson/time64.o /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c bson/buffer.c -o build/temp.macosx-10.4-x86_64-2.7/bson/buffer.o /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c bson/encoding_helpers.c -o build/temp.macosx-10.4-x86_64-2.7/bson/encoding_helpers.o /usr/bin/clang -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/6.2.2/lib build/temp.macosx-10.4-x86_64-2.7/bson/_cbsonmodule.o build/temp.macosx-10.4-x86_64-2.7/bson/time64.o build/temp.macosx-10.4-x86_64-2.7/bson/buffer.o build/temp.macosx-10.4-x86_64-2.7/bson/encoding_helpers.o -o build/lib.macosx-10.4-x86_64-2.7/bson/_cbson.so building 'pymongo._cmessage' extension /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c pymongo/_cmessagemodule.c -o build/temp.macosx-10.4-x86_64-2.7/pymongo/_cmessagemodule.o /usr/bin/clang -fno-strict-aliasing -Os -w -pipe -march=native -Qunused-arguments -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibson -I/usr/local/Cellar/python/2.7.3/include/python2.7 -c bson/buffer.c -o build/temp.macosx-10.4-x86_64-2.7/bson/buffer.o /usr/bin/clang -bundle -undefined dynamic_lookup -L/usr/local/Cellar/readline/6.2.2/lib build/temp.macosx-10.4-x86_64-2.7/pymongo/_cmessagemodule.o build/temp.macosx-10.4-x86_64-2.7/bson/buffer.o -o build/lib.macosx-10.4-x86_64-2.7/pymongo/_cmessage.so Successfully installed pymongo Cleaning up... (test1)Dus-MacBook-Air:~ mepine$ mongod -bash: mongod: command not found Thanks guys!!
0
[ 2, 92, 22, 38, 485, 3521, 5474, 1202, 75, 330, 7103, 2111, 839, 4066, 37, 11280, 800, 3726, 3726, 31, 22, 79, 946, 21, 6599, 219, 710, 27, 13, 759, 396, 332, 9, 465, 9, 300, 15, 17, 31, 23, 749, 20, 16146, 3521, 5474, 220, 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...
sql distinct function trouble === I have a query SELECT m1.mid mid, m1.uid uid, m1.date, m1.body body FROM messages m1 WHERE m1.chat_id IS NULL and deleted = 0 AND m1.date in ( SELECT MAX(m2.date) FROM messages m2 WHERE m2.uid = m1.uid AND m2.chat_id IS NULL and m2.deleted = 0 ) this querry was not actually written by me, i got help here http://stackoverflow.com/questions/11111766/cant-agregate-on-max-function - hanks them a lot. But i have a problem. When there is more than one message with the same date and uid(from the same user) values, i get two or more records with the same date and uid, but i'd like to have only one( no matter which, or the message with the greatest mid f.e.) I've tried to use distinct(uid) with no success result. Is there any other way to achive the result i want?
0
[ 2, 4444, 255, 4421, 1990, 2572, 800, 3726, 3726, 31, 57, 21, 25597, 5407, 307, 165, 9, 7825, 907, 15, 307, 165, 9, 5661, 43, 287, 1340, 15, 307, 165, 9, 8209, 15, 307, 165, 9, 9760, 358, 37, 7561, 307, 165, 113, 307, 165, 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...
speech recognition in browsers other than chrome === How to access microphone using javascript or html5 without using flash.i made it to work in chrome using webkit-speech.So i need to do it in other browsers.Ant answers will be appreciated.Thank you.
0
[ 2, 2974, 3514, 19, 16495, 18, 89, 119, 13, 12985, 800, 3726, 3726, 184, 20, 1381, 15403, 568, 8247, 8741, 54, 13, 15895, 264, 366, 568, 4433, 9, 49, 117, 32, 20, 170, 19, 13, 12985, 568, 2741, 13703, 8, 18, 1664, 7455, 9, 656, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Defining multiple streams and adding fields to each of them in PyroCMS === I am new to PyroCMS and am willing to build a Job Site wherein there'll be 2 main users namely, Employers and Job Seekers. In order to allow them to register on the site, I'm using the Streams API from PyroCMS to build the forms. These users will be part of 2 different modules namely the **Employer** module and the **Job Seeker** module. In the details.php file, under the install() function, I want to create multiple streams(database tables). The following code helps us to add a stream: $this->streams->streams->add_stream(); The following code then helps us to define the fields to be added to the stream: $this->streams->fields->add_fields($fields); My concern is how do I add multiple streams like the above ones and add fields to each of them? In other words, how would the syntax $this->streams->fields->add_fields($fields); know which stream to add the fields to?
0
[ 2, 14684, 1886, 9464, 17, 4721, 2861, 20, 206, 16, 105, 19, 19167, 9095, 18, 800, 3726, 3726, 31, 589, 78, 20, 19167, 9095, 18, 17, 589, 4452, 20, 1895, 21, 1205, 689, 113, 108, 80, 22, 211, 44, 172, 407, 3878, 8525, 15, 14028, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Does Azure WritePages for an existing blob works on Storage Emulator === I have an already existing page blob on my Storage Emulator. Now I'm trying to write some more bytes to it using WritePages but it doesn't seem to work. Does Storage Emulator support that or am I doing something wrong maybe? Here's how I'm trying to do it. var account = CloudStorageAccount.Parse("UseDevelopmentStorage=true"); var blobClient = account.CreateCloudBlobClient(); var blobContainer = blobClient.GetContainerReference("mycontainer"); blobContainer.CreateIfNotExist(); blobContainer.SetPermissions(new BlobContainerPermissions() { PublicAccess = BlobContainerPublicAccessType.Blob }); var pageBlob = blobContainer.GetPageBlobReference("filepage.txt"); pageBlob.FetchAttributes(); byte[] data = File.ReadAllBytes(@"C:\Temp\moretext.txt"); Array.Resize(ref data, 512); pageBlob.WritePages(new MemoryStream(data), 0); Thanks
0
[ 2, 630, 25715, 2757, 6486, 18, 26, 40, 3149, 334, 10904, 693, 27, 4326, 3579, 14868, 800, 3726, 3726, 31, 57, 40, 614, 3149, 2478, 334, 10904, 27, 51, 4326, 3579, 14868, 9, 130, 31, 22, 79, 749, 20, 2757, 109, 91, 34, 3231, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Click Events / Listeners in ExtJS === Hey There: I'm having difficulty handling click events with EXTJS. I define a new widget in the widget View definition, but for whatever reason the following code isn't being called on Click. Any help is much appreciated. Thanks. Ext.define('MemOS.view.Shortcut', { extend: 'Ext.view.View', alias: 'widget.shortcut', name: 'shortcut', singleSelect: true, store: 'Apps', tpl: [ '<tpl for=".">', '<div id="iconGroup" class="icon-wrap">', '<div id="icon" class="icon">', '<img src="/images/icons/" />', '</div>', '<span> {appName} </span>', '</div>', '</tpl>' ], itemSelector: 'div.icon', listeners: { click: function(d, i, n, e){ alert('foo'); } }, });
0
[ 2, 10840, 963, 13, 118, 15672, 19, 1396, 38, 728, 18, 800, 3726, 3726, 8409, 80, 45, 31, 22, 79, 452, 6967, 7988, 10840, 963, 29, 1396, 38, 728, 18, 9, 31, 9267, 21, 78, 4807, 43, 3060, 19, 14, 4807, 43, 3060, 1418, 5465, 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...
Possible Memory Leak: new char[strlen()] === This is a fairly basic question and I am pretty sure I know the answer, but seeing as the consequence for being wrong is a segfault I figure I should ask. I have been using strlen and the new char operator in the following way for quite some time now and just noticed something that threw up a red flag: void genericCopy(char *somestring, char *someOtherString) { someOtherString = new char[strlen(somestring)]; strcpy(someOtherString,somestring); } My question is, seeing as a string should be null terminated, should I be doing this as such: void genericCopy(char *somestring, char *someOtherString) { someOtherString = new char[strlen(somestring)+1]; strcpy(someOtherString,somestring); someOtherString[strlen(someOtherString)] = '\0'; } So far I have never had a problem with the first method, but that doesn't mean I'm doing it right. Since length being return by strlen is the number of characters in the string without the null terminator so new isn't reserving space for '/0'... At least I don't think it is.
0
[ 2, 938, 1912, 11724, 45, 78, 4892, 2558, 9729, 2284, 5, 6, 500, 800, 3726, 3726, 48, 25, 21, 6647, 2125, 1301, 17, 31, 589, 1772, 562, 31, 143, 14, 1623, 15, 47, 2078, 28, 14, 9348, 26, 142, 1389, 25, 21, 1353, 16368, 9708, 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...
Changing Map Infowindow from alert dialogue to simple map Info === I have map Application in android and there is alert dialogue when i click on marker But i want to convert the alert dialogue to simple infowindow like this http://3.bp.blogspot.com/-PrYuYQMcGcc/Ta__3fCcw7I/AAAAAAAAAGU/xCxjK3slU4k/s1600/google_map_marker_tooltip_popup_android.JPG Here is My Map Overlay Item Code which i am using to populate the Infowindow public class CustomItemizedOverlay extends ItemizedOverlay<OverlayItem> { private ArrayList<OverlayItem> mapOverlays = new ArrayList<OverlayItem>(); private Context context; public CustomItemizedOverlay(Drawable defaultMarker) { super(boundCenterBottom(defaultMarker)); } public CustomItemizedOverlay(Drawable defaultMarker, Context context) { this(defaultMarker); this.context = context; } @Override protected OverlayItem createItem(int i) { return mapOverlays.get(i); } @Override public int size() { return mapOverlays.size(); } @Override protected boolean onTap(int index) { OverlayItem item = mapOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(context); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show(); return true; } public void addOverlay(OverlayItem overlay) { mapOverlays.add(overlay); this.populate(); } }
0
[ 2, 4226, 2942, 15404, 27508, 37, 7863, 6402, 20, 1935, 2942, 15404, 800, 3726, 3726, 31, 57, 2942, 3010, 19, 13005, 17, 80, 25, 7863, 6402, 76, 31, 10840, 27, 13289, 47, 31, 259, 20, 8406, 14, 7863, 6402, 20, 1935, 15404, 27508, 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...
Get multi-line text in between horizontal delimiter with sed / awk === I would like to get multi-line text in between horizontal delimiter and ignore anything else before and after the delimiter. An example would be:- ---------- Line 1 Line 2 Line 3 Line 4 ---------- Line 1 Line 2 Line 3 Line 4 ---------- And I would like to get Line 1 Line 2 Line 3 Line 4 Line 1 Line 2 Line 3 Line 4 How do I do this with awk / sed with regex? Thanks.
0
[ 2, 164, 1889, 8, 1143, 1854, 19, 128, 10095, 121, 20565, 106, 29, 13924, 13, 118, 13, 3885, 197, 800, 3726, 3726, 31, 83, 101, 20, 164, 1889, 8, 1143, 1854, 19, 128, 10095, 121, 20565, 106, 17, 7174, 602, 962, 115, 17, 75, 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...
Migrate trigger Oracle to SQL Server === People, I need migrate a Oracle trigger to SQL server, but I could not do. The trigger in Oracle is very simple: CREATE OR REPLACE TRIGGER trigger_teste BEFORE INSERT OR UPDATE ON teste FOR EACH ROW DECLARE BEGIN :new.id := (coalesce(:NEW.id, 0)); :new.vlr_sal := (coalesce(:NEW.vlr_sal, 0.00)); END; I tried several ways but none successfully! Thank for help!
0
[ 2, 22985, 7286, 15759, 20, 4444, 255, 8128, 800, 3726, 3726, 148, 15, 31, 376, 22985, 21, 15759, 7286, 20, 4444, 255, 8128, 15, 47, 31, 110, 52, 107, 9, 14, 7286, 19, 15759, 25, 253, 1935, 45, 1600, 54, 3934, 7286, 7286, 1, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Resizing UIView from drawRect() === I have a UIView and drawing its content from drawRect(), but I need to resize the view sometimes depending on some calculation that are done during the drawing: When I change the size, the drawing seams to scale and not to use the additional size gained from the resize. This is how I'm resizing form drawRect() CGRect limits = self.frame ; limits.size.width = 400; self.frame = limits; It seams like the context is not aware of the resize and is drawing using the old sizes. I already try [self setNeedsDisplay] after resizing but the draw method is not called again.
0
[ 2, 10719, 3335, 13, 5661, 4725, 37, 2003, 14673, 38, 5, 6, 800, 3726, 3726, 31, 57, 21, 13, 5661, 4725, 17, 3533, 82, 2331, 37, 2003, 14673, 38, 5, 6, 15, 47, 31, 376, 20, 302, 10454, 14, 1418, 1030, 4758, 27, 109, 19644, 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...
app fc on query of sqlite database === Sorry for the noop question but I just cant seam to get it to work. I created my database table with this command: newLeaseName = "INSERT INTO LeaseNames (colLeaseNames, colOilWells, " + "colWaterWells, colTank1, colTank2, colTank3, colTank4)" + " VALUES ('"+ leaseName + "', '" + numOfOilWellsValue + "', '" + numOfWaterWellsValue + "', " + stockTank1Size + ", " + stockTank2Size + ", " + stockTank3Size + ", " + stockTank4Size + ")"; myDataBase.execSQL(newLeaseName); when I query the database with either a rawquery or query statement the app crashes and the log points to my query statement. I want to look in table "LeaseNames" for a string in the column "colLeaseNames" that matches the variable string "enterLogLN" (which is from an editText) and then return the integer from the "colWaterWells" column of the same row. Could anyone help with this, Thanks
0
[ 2, 4865, 2644, 27, 25597, 16, 4444, 10601, 6018, 800, 3726, 3726, 1875, 26, 14, 90, 2594, 1301, 47, 31, 114, 2973, 13927, 20, 164, 32, 20, 170, 9, 31, 679, 51, 6018, 859, 29, 48, 1202, 45, 78, 413, 6105, 7259, 800, 13, 7, 108,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c++ simple test in eclipse-cdt. I dont want any framework only the ability to have tests with main === I am new to cpp (come from Java). I write small project (it will not getting bigger than few classes) and i want to have test on my classes. I was naive to think that i will find simple test framework that will be supported with eclipse and i will be able to run the test in the same project , but i waste a lot of time on cppunit and google-test and i don't want this complexity. I am not going to run this test automatically and the project will not getting bigger. i want to keep it simple and stupid . directory in the project called test with exclude on this directory for run and debug build. in this directory to have one class MainTest. My problems is: How to have a build configuration for test that will include the test folder for test mode and ignore the main class in the source folder in order to avoid compilation error.
0
[ 2, 272, 20512, 1935, 1289, 19, 11652, 8, 6324, 38, 9, 31, 1049, 259, 186, 6596, 104, 14, 2165, 20, 57, 4894, 29, 407, 800, 3726, 3726, 31, 589, 78, 20, 272, 3421, 13, 5, 3967, 37, 8247, 6, 9, 31, 2757, 284, 669, 13, 5, 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...
PHP add 'x' amount of hours to date? === I currently have php get the current time/date like so: $now = date("Y-m-d H:m:s"); What id like to do is have a new variable `$new_time` equal `$now` + `$hours`. `$hours` being an amount of hours ranging anywhere from 24-800. Any suggestions?
0
[ 2, 13, 26120, 3547, 13, 22, 396, 22, 2006, 16, 974, 20, 1231, 60, 800, 3726, 3726, 31, 871, 57, 13, 26120, 164, 14, 866, 85, 118, 8209, 101, 86, 45, 5579, 1387, 800, 1231, 5, 7, 93, 8, 79, 8, 43, 746, 45, 79, 45, 18, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iPhone Regular Expression With Pattern to Extract URL of Image === I parse an RSS feed and am attempting to get the URL to the image in the feed that is located in the content:encoded item of the RSS. There are multiple HREFs in this section of text, and the regex with pattern I have been using just pulls out the first URL. I found this pattern online, and am not for sure how I could change it to what I need. Any thoughts? NSString *thearticleImage = entry.articleImage; NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))" options:NSRegularExpressionCaseInsensitive error:NULL]; NSString *someString = thearticleImage; NSString *oneurl = [someString substringWithRange:[expression rangeOfFirstMatchInString:someString options:NSMatchingCompleted range:NSMakeRange(0, [someString length])]];
0
[ 2, 21024, 1290, 1803, 29, 3732, 20, 10962, 287, 6362, 16, 1961, 800, 3726, 3726, 31, 2017, 870, 40, 13, 1224, 18, 4063, 17, 589, 6314, 20, 164, 14, 287, 6362, 20, 14, 1961, 19, 14, 4063, 30, 25, 335, 19, 14, 2331, 45, 219, 222...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Hard Code Value for @Html.EditorFor === My MVC 3 application needs to create new users. I want to hard code the ApplicationId for the ApplicationId text box in the view. Does anyone know how to do this? <div class="editor-label"> @Html.LabelFor(model => model.ApplicationId) </div> <div class="editor-field"> @Html.EditorFor(model => model.ApplicationId) @Html.ValidationMessageFor(model => model.ApplicationId) </div>
0
[ 2, 552, 1797, 1923, 26, 13, 1, 15895, 9, 13401, 1106, 800, 3726, 3726, 51, 307, 8990, 203, 3010, 2274, 20, 1600, 78, 3878, 9, 31, 259, 20, 552, 1797, 14, 3010, 1340, 26, 14, 3010, 1340, 1854, 1649, 19, 14, 1418, 9, 630, 1276, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Convert XML file with 9 unique fields per line to pre-formed URLs using only 4 of field per line === I'm working on an API call with Flickr, that returns results per photo like: <photo id="7503362468" owner="59044395@N02" secret="66b94027db" server="8423" farm="9" title="Potluck" ispublic="1" isfriend="0" isfamily="0" /> Now, according to Flickr's URL/API documentation, their URLs are structured like this, with the mstzb's being one-letter indicators of the size of the photo: http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg So, my question has to do with a mass search and replace that can take each line, prepend the `http://farm` and then basically just "fill in the blanks" for the rest. The goal would be to use the API to fetch a restful XML that I can then throw the replacer at and have a list of URLs get generated. I have a brief familiarity with sed - admittedly no wizard at it - but I'm just unsure of how to do a search and replace per line, that prepends, then replaces in the proper order. Of course, the farm-id is the first to go into the URL, and is the fifth field in the XML - what I mean is the search and replace pattern follows the same locations for each line. Admittedly, again, I'm just getting started with regex-type stuff and any help would be appreciated. I also see that this sort of question has been asked before, but they seemed to be focused on how to create URL syntax rather than a sed-style replace. Thanks y'all!
0
[ 2, 8406, 23504, 3893, 29, 561, 2619, 2861, 416, 293, 20, 782, 8, 12609, 13, 911, 7532, 568, 104, 268, 16, 575, 416, 293, 800, 3726, 3726, 31, 22, 79, 638, 27, 40, 21, 2159, 645, 29, 12407, 139, 15, 30, 4815, 1736, 416, 3056, 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...
Is the behavior of MPI communication of a rank with itself well-defined? === What happens if you use one of the MPI communication methods to have a rank communicate with itself? Is there a well-defined behavior (e.g. guaranteed to succeed or fail), or does it depend on chance/other uncontrollable influences, whether the program will continue to run or not? An example would be a fluid dynamics code, where each rank determines which grid cells need to be sent to the neighboring ranks to create the necessary halo for the computational stencil. If the simulation is started just on one rank, there would be non-blocking send/receive of rank 0 with itself (sending around 0-length information).
0
[ 2, 25, 14, 3257, 16, 4628, 49, 3291, 16, 21, 2839, 29, 1145, 134, 8, 13439, 60, 800, 3726, 3726, 98, 5531, 100, 42, 275, 53, 16, 14, 4628, 49, 3291, 3195, 20, 57, 21, 2839, 8709, 29, 1145, 60, 25, 80, 21, 134, 8, 13439, 3257...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
transforming RPC API to Rest API === I am started playing with REST, and trying to understand how I can map following RPC style Web Method to REST style. public PerformanceResponse GetPerformance(int lineId, int maxNumberOfEntries, bool ascending) This is the only operation I have related to Performance and it just extracts some information from DB. Thanks for assistance.
0
[ 2, 22335, 761, 5779, 21, 2159, 20, 760, 21, 2159, 800, 3726, 3726, 31, 589, 373, 791, 29, 760, 15, 17, 749, 20, 1369, 184, 31, 92, 2942, 249, 761, 5779, 1034, 2741, 2109, 20, 760, 1034, 9, 317, 956, 99, 18, 8782, 870, 164, 225...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 give a unique ID to each inserted item in array? === I run a situation where I put stuff into array like that: $current_pms[] = array( 'from' => sofa_get_username($current_user->ID), 'to' => $valid_user, 'subject' => $subject, 'message' => $message, 'status' => 'unread', 'time' => current_time('mysql', $gmt = 0) ); How can I mark each entry with its own unique ID so I can grab it later? Thanks
0
[ 2, 184, 20, 590, 21, 2619, 4924, 20, 206, 14215, 9101, 19, 7718, 60, 800, 3726, 3726, 31, 485, 21, 1858, 113, 31, 442, 3217, 77, 7718, 101, 30, 45, 5579, 17657, 1, 5576, 18, 2558, 500, 800, 7718, 5, 13, 22, 2665, 22, 800, 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 to access javascript variable in global.asax? === I have a javascript variable in a page default.aspx var name="user1" window.location="test.aspx" this page will submit to test.aspx and in global.asax while firing Application_BeginRequest event ,i need to access the variable "name". i need to do this without cookies. Anyone can help me on this?
0
[ 2, 184, 20, 1381, 8247, 8741, 7612, 19, 2062, 9, 8588, 396, 60, 800, 3726, 3726, 31, 57, 21, 8247, 8741, 7612, 19, 21, 2478, 12838, 9, 472, 306, 396, 4033, 204, 3726, 7, 16704, 165, 7, 1463, 9, 19032, 3726, 7, 10543, 9, 472, 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...
How to get the descendants of all objects in an array? (Rails + ancestry gem) === I am using this gem https://github.com/stefankroes/ancestry for my People modle. The table looks like this: +----+----------+ | id | ancestry | +----+----------+ | 1 | NULL | | 2 | 1 | | 3 | 1 | | 4 | 1/2 | | 5 | 1/3 | | 6 | NULL | | 7 | 1/2 | | 8 | 1/2 | | 9 | 1/3 | | 10 | NULL | | 11 | 10 | | 12 | 10 | | 13 | NULL | | 14 | NULL | | 15 | 6 | | 16 | 6 | | 17 | 6/16 | | 18 | 6 | | 19 | 6/18 | | 20 | 14 | +----+----------+ What I want to query is: 1. given two people with id 1 and 6 2. get all descendants of these two people 3. in one query instead of querying one by one since I need to put this into an Arel.or method. I knew that using: People.select("id").where(People.arel_table[:ancestry].matches("6/%")) generates LIKE sql statement and returns all grandchildren of the people with id 6. I also knew: People.select("id").where(People.arel_table[:ancestry].matches(["1/%","6/%"])) doesn't work because it generates invalid LIKE statement: SELECT id FROM `people` WHERE (`people`.`ancestry` LIKE '1/%', '6/%') On the other hand, I knew: People.select("id").where(People.arel_table[:ancestry].in(["1", "6"])) generates IN sql statement and returns all children (but not grandchildren) of both 1 and 6. My question then is: how can I put them all into a (probably chaining) query to get all descendants of both 1 and 6? In this example, I would expect the result is: [ 2, 3, 4, 5, 7, 9, 15, 16, 17, 18, 19 ]. Thank you very much for the suggestions
0
[ 2, 184, 20, 164, 14, 8568, 16, 65, 3916, 19, 40, 7718, 60, 13, 5, 7301, 18, 2754, 12140, 8551, 6, 800, 3726, 3726, 31, 589, 568, 48, 8551, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 28150, 197, 661, 160, 118, 2416, 18, 5840, 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...
datagridview filtering function, it works perfect but 3 is also 13 and 334 === so here is my function..it works perfect except it filters every cell the contain the number 3 like 300 313 30 43 but i want it to filter only cell values that contain 3!! Private Sub LinkLabel4_Click(sender As Object, e As System.EventArgs) Handles LinkLabel4.Click Dim search As String search = "SELECT * FROM products WHERE rank LIKE '%" & 3 & "%'" Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\db.mdb" Dim adapter As New OleDbDataAdapter(search, connectionString) Dim dt As New DataTable("products") adapter.Fill(dt) DataGridView1.DataSource = dt End Sub another things is the what would be the select statements for filtering with values between 2 specified numbers, like between 4 and 16 Thanks
0
[ 2, 1054, 16375, 4725, 25272, 1990, 15, 32, 693, 2107, 47, 203, 25, 67, 539, 17, 13, 24606, 800, 3726, 3726, 86, 235, 25, 51, 1990, 9, 9, 242, 693, 2107, 1613, 32, 21062, 352, 1667, 14, 3717, 14, 234, 203, 101, 3565, 13, 20122, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 cookies or tokens with cross domain forms authentication === I am trying to implement authentication using jQuery and Forms Authentication on an ASP.NET MVC 3 web service. The idea is that I'll do a jQuery AJAX post to the web service, which will do Forms Authentication and return a cookie or token, and with each data access call, my web application (jQuery) will use that cookie or token. **What I have** - I have the AJAX call to the ASP.NET Web service set up, and I have the web service set up as follows: public ActionResult Login(string userName, string password, bool rememberMe, string returnUrl) { if (ModelState.IsValid) { if (Membership.ValidateUser(userName, password)) { return Json(FormsAuthentication.GetAuthCookie(userName, rememberMe), JsonRequestBehavior.AllowGet); } else { return Json("Authentication Failed", JsonRequestBehavior.AllowGet); } } } This is working so that if I make the AJAX call with correct credentials, I am returned a cookie in JSON, and if not, I'm returned the auth failed string. **What I don't know** - What to do with the JSON cookie once I receive it back. I can store this in HTML5 local storage, but I don't know what part of it (or the whole thing) to send back with my data access calls, and how to interpret it and check the cookie on the web service side. If I shouldn't be using cookies, is there a way to generate and use a token of some kind?
0
[ 2, 568, 19396, 54, 20, 2853, 18, 29, 919, 4603, 1997, 27963, 800, 3726, 3726, 31, 589, 749, 20, 8713, 27963, 568, 487, 8190, 93, 17, 1997, 27963, 27, 40, 28, 306, 9, 2328, 307, 8990, 203, 2741, 365, 9, 14, 882, 25, 30, 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...
Failure to run application on the device IOS with Tibar module === I have a problem with the tibar (barcode scanner http://code.google.com/p/tibar/), when run on my iphone, xcode returns an error exit 65, I've outlined below: ** BUILD FAILED ** The following build commands failed: Ld build/Scannn.build/Debug-iphoneos/Scannn.build/Objects-normal/armv6/Scannn normal armv6 (1 failure) EXIT CODE WAS: 65 Exception detected in script: Traceback (most recent call last): File "/Users/xxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1465, in main execute_xcode("iphoneos%s" % iphone_version,args,False) File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1224, in execute_xcode output = run.run(args,False,False,o) File "/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/run.py", line 41, in run sys.exit(rc) SystemExit: 65 if I run the application directly in xcode, it works correctly. My configuration: - Titanium SDK: 2.0.1.GA2 - XCode: 4.3.2 - iOS: 5.1.1 (iphone 4s) - Tibar: 0.4.2 Thanks!!!
0
[ 2, 2990, 20, 485, 3010, 27, 14, 3646, 13, 7760, 29, 4174, 1850, 12613, 800, 3726, 3726, 31, 57, 21, 1448, 29, 14, 4174, 1850, 13, 5, 1850, 9375, 23195, 7775, 6903, 9375, 9, 16111, 4875, 9, 960, 118, 306, 118, 1388, 1850, 118, 6,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Fire an event when button is clicked === In below fiddle is it possible to attach a listener to the vote button so that when vote is clicked a listener is fired, in this case just an alert ? I've tried attaching the css to a listener but not working. : $('.pds-return-poll').on('click', function () { alert('here'); }); http://jsfiddle.net/Wx5mM/2/ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".pds-pd-link").hide(); $(".a2a_dd.pds-share").hide(); }); </script> <script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/6343621.js"></script> <noscript><a href="http://polldaddy.com/poll/6343621/">New Poll</a></noscript>
0
[ 2, 535, 40, 807, 76, 5167, 25, 15802, 800, 3726, 3726, 19, 1021, 12759, 25, 32, 938, 20, 19514, 21, 21772, 20, 14, 2018, 5167, 86, 30, 76, 2018, 25, 15802, 21, 21772, 25, 3899, 15, 19, 48, 610, 114, 40, 7863, 13, 60, 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...
Excel function as a string, called from VBA === If i enter the following excel function in a cell and press enter, it works: "=DisplayReport(A1)" but if I write the following in VBA: Sheets("Sheet1").Cells(2, 1).Formula = "=DisplayReport(A1)" Sheets("Sheet1").Cells(2, 1).Calculate it doesnt work. How can I hardcode the cell A1 into the above VBA so that it is recognised and the function works?
0
[ 2, 20700, 1990, 28, 21, 3724, 15, 227, 37, 566, 969, 800, 3726, 3726, 100, 31, 2830, 14, 249, 20700, 1990, 19, 21, 1667, 17, 901, 2830, 15, 32, 693, 45, 13, 7, 3726, 2906, 5438, 17437, 5, 58, 165, 6, 7, 47, 100, 31, 2757, 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...
Unit testing Clojure on the fly in a separate frame === I was watching an amazing "Emacs rocks" video and I noticed that the developers were using two windows side by side where one window is Emacs and the other window is used to (nearly) constantly run unit tests. The video is here (it's really good looking IMO): http://www.youtube.com/watch?v=Zxt-c_N82_w How can I do the same when working with Clojure? What I'd would like to see on screen would be: - the .clj file I'm currently editing in a buffer - one REPL - one other window (an Emacs frame?) where I could see the results of my unit tests (the unit tests themselves being defined either inside each .clj file they test or in separate .clj files, I don't care) Ideally I'd like to have the results of the unit tests shown in another Emacs frame but a regular terminal would do too (as long as there's at least some color support). Is anyone doing anything similar? I don't mind shell scripting or elisp'ing or anything else as long as it allows to get a similar setup to unit tests Clojure code.
0
[ 2, 1237, 4431, 7383, 2142, 99, 27, 14, 2855, 19, 21, 1725, 3523, 800, 3726, 3726, 31, 23, 1953, 40, 5289, 13, 7, 62, 6893, 18, 4860, 7, 763, 17, 31, 2711, 30, 14, 10168, 46, 568, 81, 1936, 270, 34, 270, 113, 53, 1463, 25, 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...
.net mvc3 fesourcefile and Multi tenancy === I have learned much and solved a lot of problems coming up with multi-tenancy. But one problem still exists. I have to offer a tenant-specific resourcefile because our customers want some text a little different then other customers. Is there a way to implement a multi-tenant resourceManager? I haven't found anything else in the www. Thanks in advance. ©a-x-i
0
[ 2, 13, 9, 2328, 307, 8990, 240, 3686, 12097, 16877, 17, 1889, 652, 10821, 800, 3726, 3726, 31, 57, 2691, 212, 17, 15091, 21, 865, 16, 1716, 880, 71, 29, 1889, 8, 1316, 10821, 9, 47, 53, 1448, 174, 5636, 9, 31, 57, 20, 1994, 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...
Google Map to Search in Polygon Only === I am making a Google Map (API v3) that searches within a given neighborhood. The neighborhood is not a square but a ton of different points to make a polygon bounding box. I know how to make the polygon but not sure how to get it to search only within the polygon. Below you can see I am using a radius from my center location but I don't need a radius but only a given location. var request = { location: centerLatlng, radius: 800, types: ["school", "church", "park", "university"] };
0
[ 2, 8144, 2942, 20, 2122, 19, 21309, 104, 800, 3726, 3726, 31, 589, 544, 21, 8144, 2942, 13, 5, 2552, 49, 566, 240, 6, 30, 19994, 363, 21, 504, 3548, 9, 14, 3548, 25, 52, 21, 735, 47, 21, 13, 444, 16, 421, 819, 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...
URL Rewrite for subdomains in ASP.Net === How can I make URL rewrite rule for this url: example.com/account/login.aspx to this url: me.example.com/login So any request to the folder /account will rewrite to me.example.com. Also sub folders and file like /account/subfoler/file1.aspx will rewrite to me.example.com/subfolder/file1 I already set the DNS wildcard to the app and all subdomains will take to the same ip address. All I need is the url rewrite rule.
0
[ 2, 287, 6362, 27891, 26, 972, 537, 6232, 18, 19, 28, 306, 9, 2328, 800, 3726, 3726, 184, 92, 31, 233, 287, 6362, 27891, 1828, 26, 48, 287, 6362, 45, 823, 9, 960, 118, 29148, 118, 5567, 108, 9, 472, 306, 396, 20, 48, 287, 6362,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
are USENET or NNTP articles loaded in chronological or reverse chronological order? === sample newsrc: thufir@dur:~$ cat .newsrc gwene.com.androidcentral: 1-99999999 gwene.com.blogspot.emacsworld: 1-99999999 gwene.com.blogspot.googlecode: 1-99999999 gwene.com.blogspot.googlereader: 1-99999999 gwene.com.economist: 1-99999999 gwene.com.googlereader: 1-99999999 thufir@dur:~$ Now, I have [leafnode][1] configured to save messages for 999 days. When [GNU NNTP][2] connects to leafnode on localhost there can be a big of lag while things load. Currently, what I've done is to configure Leafnode to just store 35 days for particular groups, so that things load more quickly. However, when looking over the .newsrc again, it seems that I could probably let leafnode store a very large number of articles and then configure the .newsrc which GNU NNTP uses so that only a small portion of those messages are fetched. If so, this would allow for long retention in leafnode, 999 days, which alleviating the delay in connecting to leafnode and loading the articles from GNU NNTP. However, will that work? Will only the **newer** articles get loaded, or will it load the **old** articles? Unfortunately, [RFC 977][3] doesn't actually mention .newsrc files. Of course, whether GNU NNTP follows the RFC would be a separate question, but, at least according to the RFC, presumably **newer** questions are loaded and **older** questions left? [1]: http://leafnode.sourceforge.net/ [2]: http://www.gnu.org/software/classpathx/javamail/javadoc/gnu/mail/providers/nntp/package-summary.html [3]: http://tools.ietf.org/html/rfc977
0
[ 2, 50, 275, 2328, 54, 13, 9377, 13726, 3376, 8572, 19, 22075, 54, 7006, 22075, 389, 60, 800, 3726, 3726, 5717, 996, 5453, 45, 14808, 17482, 1, 10852, 45, 1, 4403, 2008, 13, 9, 14962, 5453, 10380, 62, 9, 960, 9, 290, 18524, 6306, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Devpanel Extension Communicating with Background Page === I have an extension to the chrome devtools panel. I can send messages to the page using `chrome.devtools.inspectedWindow.eval` ... but how do I receive messages in the dev panel? Specifically, I need my devpanel to hook into events that happen on the page. I can't get it to listen to events on my content script, nor the background page. I've tried `chrome.extension.sendMessage` in the content script, along with `chrome.extension.onMessage.addListener` in the dev panel script. But `sendMessage` complains with `Port error: Could not establish connection. Receiving end does not exist.` The issue persists with long-lived connections: In content script or background page: var port = chrome.extension.connect({name: "test"}); port.postMessage({msg: "testing"}); In dev tools panel javascript: chrome.extension.onConnect.addListener(function(port) { port.onMessage.addListener(function(msg) { // never gets here }); }); How can I listen for events that are triggered in my content script-- in my dev tool panel? A diagram like this from Firefox's Add-On SDK would be great: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/static-files/media/content-scripting-overview.png
0
[ 2, 13, 12985, 9664, 3206, 532, 3896, 23284, 29, 2395, 2478, 800, 3726, 3726, 31, 57, 40, 3896, 20, 14, 13, 12985, 9664, 20799, 18, 4113, 9, 31, 92, 2660, 7561, 20, 14, 2478, 568, 13, 1, 12985, 9, 14438, 20799, 18, 9, 108, 7350, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
vim php_javascriptInStrings option? === i notice that the syntax/php.vim file on my ubuntu machine has a php_htmlInStrings option. i can turn this option on to display html syntax highlighting within strings in my php files which is great. i would also like to do javascript syntax highlighting within strings in a php file - does anybody know if this can be done? and if so how can i do it?
0
[ 2, 1790, 79, 13, 26120, 1, 1004, 1385, 8741, 108, 11130, 18, 4255, 60, 800, 3726, 3726, 31, 3551, 30, 14, 22649, 118, 26120, 9, 1755, 79, 3893, 27, 51, 287, 12968, 2473, 1940, 63, 21, 13, 26120, 1, 15895, 108, 11130, 18, 4255, 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...
Making an OAuth connection from a Windows application to a Google App Engine application === We have a Windows 7 Task Tray application that needs to access services in our Google App Engine application, and we are having difficulty making the OAuth connection between them work. For some reason our OAuth libraries that work with the Twitter and Tumblr OAuth implementations do not seem to work in this scenario with Google. Google is returning a 400 bad request response to the last step in the OAuth authorization sequence. The problem appears to be related to the 'Scope' OAuth parameter. It isn't really clear from the documentation on Google how that parameter should be set when a GAE app is being used as the OAuth service host. Using Google's OAuth 1.0 Playground page (http://googlecodesamples.com/oauth_playground/index.php) I can simulate every step of our OAuth sequence, and in step 1 if I enter the name of our GAE server the sequence will fail with the error message "Invalid scope". Clearly, choosing one of the provided scopes (the Google services) is not an option for us. Can anybody tell me how the OAuth scope designation should be set when accessing Google App Engine hosted services?
0
[ 2, 544, 40, 635, 1346, 96, 2760, 37, 21, 1936, 3010, 20, 21, 8144, 4865, 1406, 3010, 800, 3726, 3726, 95, 57, 21, 1936, 453, 3005, 10121, 3010, 30, 2274, 20, 1381, 687, 19, 318, 8144, 4865, 1406, 3010, 15, 17, 95, 50, 452, 6967,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
ivars naming conventions and @synthesis === Sorry for the long read. This is a part of the book I'm confused on. > The current trend in coding conventions (which Xcode 4 has adopted) is > to use an underscore (_) as the leading character for an instance > variable name. So any references you see in the template code > generated by Xcode to variables starting with a _ are referencing the > instance variables directly by name. When you see an @synthesize > directive that looks like this > > @synthesize window=_window; Why couldn't `_window` be declared in @propterty/synthesize in the first place instead of assigning it to `window`? > it says to synthesize the getter and setter for the property named > window and to associate that property with an instance variable called > _window (which does not have to be explicitly declared). This helps to distinguish the use of the instance variable from the property and to > encourage you to set and retrieve the value of the instance variable > through the setter and getter methods. That is, writing something like > this > > [window makeKeyAndVisible]; // This won't work > > will fail, as there is no instance variable named window. Instead, you > have to either name the instance variable directly by its name, such > as > > [_window makeKeyAndVisible]; > > or, preferably, use the accessor method: > > [self.window makeKeyAndVisible]; Why does `self.window` not need the underscore when the other methods do?
0
[ 2, 31, 3311, 18, 10929, 15117, 17, 13, 1, 9507, 124, 4557, 800, 3726, 3726, 1875, 26, 14, 175, 1302, 9, 48, 25, 21, 141, 16, 14, 360, 31, 22, 79, 4230, 27, 9, 13, 1, 14, 866, 8703, 19, 13, 15458, 15117, 13, 5, 2140, 993, 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...
How can I go throught every tab in Excel file to evaluate header value in SSIS === I've a SSIS solution to import data from Excel file to SQl Server table. But the Excel file have differents tabs and I need to go for each one evaluating the header value for A1 cell, if it's for sample "Appointment Count", that is the tab I have to imported. some idea how can I do it? thanks Eliana
0
[ 2, 184, 92, 31, 162, 120, 38, 352, 6523, 19, 20700, 3893, 20, 13, 15599, 157, 106, 1923, 19, 13, 18, 4557, 800, 3726, 3726, 31, 22, 195, 21, 13, 18, 4557, 4295, 20, 9010, 1054, 37, 20700, 3893, 20, 4444, 255, 8128, 859, 9, 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...
Toggle between Telephony and Wifi Programmatically (Android) === I want to guarantee that the phone has both wifi and telephony, then turn telephony on, do some work then switch to wifi connecting **to the last access point** after switching and do more work. I've looked at a few different sources and I'm stuck in a few areas. my specific questions are in the code blocks. Thanks for any advice! protected void onCreate(Bundke savedInstanceState) { WifiManager wifimanager = (WifiManager)getSystemService(Context.WIFI_SERVICE); TelelphonyManager telephonymanager =(TelelphonyManager)getSystemService(Context.TELEPHONY_SERVICE); if(wifiManager == null || telephonymanager == null) { Log.v(TAG, "don't have access to either wifi or telephony") return; } boolean wifidisabled = wifimanager.setWifiEnabled(false); //disable wifi /*i don't also need to disconnect wifi here, right?*/ if(telephonymanager.getDataState() == TelephonyManager.DATA_CONNECTED) { //do work } else if(telephonymanager.getDataState() == TelephonyManager.DATA_DISCONNECTED) { /*I'm not sure how to turn this on if this is the case. Or will it ever be the case Any help?*/ //do work } boolean wifienabled = wifimanager.setWifiEnabled(true); boolean wificonnected = wifimanager.reconnect(); /*will this connect to the last access point (the one used by telephony)?*/ //do work } Do I need all of these in my AndroidManifest file? Would I need anything else? <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission> <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS"></uses-permission> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission> <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission> These are some of the links I looked at. I've looked at more though: http://stackoverflow.com/questions/7205720/how-to-handle-wifi-to-mobile-network-switch-programatically http://marakana.com/forums/android/examples/40.html http://stackoverflow.com/questions/5322097/tutorial-on-wifi-in-android http://www.tutorialforandroid.com/2009/10/turn-off-turn-on-wifi-in-android-using.html http://stackoverflow.com/questions/5782790/how-to-check-if-wifi-3g-is-enabled
0
[ 2, 20, 263, 4875, 128, 4338, 22031, 17, 4807, 1707, 625, 6732, 1326, 13, 5, 290, 18524, 6, 800, 3726, 3726, 31, 259, 20, 9120, 30, 14, 1132, 63, 156, 4807, 1707, 17, 4338, 22031, 15, 94, 805, 4338, 22031, 27, 15, 107, 109, 170, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 can I loop music of Loacl notificatios when push Local? === How can I loop music of Loacl notificatios when push Local? It continue looping unless user press button in alert to active app!
1
[ 2, 184, 92, 31, 5293, 232, 16, 2205, 58, 5316, 52, 24831, 15752, 18, 76, 3250, 375, 60, 800, 3726, 3726, 184, 92, 31, 5293, 232, 16, 2205, 58, 5316, 52, 24831, 15752, 18, 76, 3250, 375, 60, 32, 1816, 5293, 68, 4003, 4155, 901, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How are math instructions implemented on hardware? === I'm looking for some sample code that "emulates" the most frequently used math instructions(addition,subtraction,multiplication,division) and will cover all steps that a hardware based cpu processor follows. The first thing i did was to use google and got this : https://bochs.svn.sourceforge.net/svnroot/bochs/trunk/bochs/cpu/ But its not what i want.This is an instruction wrapper/emulator while i want to see how the cpu does everything down to bit level... ..
0
[ 2, 184, 50, 5057, 7650, 6807, 27, 7610, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 109, 5717, 1797, 30, 13, 7, 1503, 12383, 18, 7, 14, 127, 3086, 147, 5057, 7650, 5, 14854, 9861, 15, 7563, 19915, 872, 15, 21531, 20669, 15, 17557,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 complete walk through for a Ruby/Mechanize login, including cookies === I've got a website im attempting to log into with Ruby / Mechanize and Nokogiri. I've supplied all of the required information however it seems that I cannot print out the resulting page post login. A description including: - cookie usage for mechanize - usage of hidden fields - what can be used in the chrome network profile tool to ensure that im passing all the needed parameters.
0
[ 2, 25, 80, 21, 1279, 1466, 120, 26, 21, 10811, 118, 790, 3606, 2952, 6738, 108, 15, 215, 19396, 800, 3726, 3726, 31, 22, 195, 330, 21, 2271, 797, 6314, 20, 6738, 77, 29, 10811, 13, 118, 55, 3606, 2952, 17, 90, 921, 14913, 9, 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...
Key Shortcuts on a web page === Alright so for my website I'd like to enable keyboard shortcuts. When left or right button is pressed on the keyboard, it opens an URL. Also binding some other buttons too maybe. Any clue how I can go about doing this?
0
[ 2, 1246, 502, 4118, 18, 27, 21, 2741, 2478, 800, 3726, 3726, 11885, 86, 26, 51, 2271, 31, 22, 43, 101, 20, 9240, 8896, 502, 4118, 18, 9, 76, 225, 54, 193, 5167, 25, 2931, 27, 14, 8896, 15, 32, 8965, 40, 287, 6362, 9, 67, 872...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 Tower Defense Missile Calculation === First, thank you for taking your time to help me. I am trying to develop a small java 2d tower defense game and I have run into problems trying to calculate how to do my missiles. After hours of searching and testing I am even more confused. What I have so far is: 1) 4 cases depending on where the tower is located according to the unit it is firing at(NW, NE, SW, SE) 2) I need to calculate the distance between the current target and the tower the missile is coming from using the Math.sqrt(x2, x1, y2, y1). 3) Scaling the x and y of the missile. Now the problem I am running into is how to scale the incrementing x and y of the missile towards the target so it seems realistic. Math is not my strong suit and it is showing here. Below I have show what I have for the SE quadrant from the tower. public int distanceX, distanceY; public double sep, scale; if(xBullet < Screen.mobs[shotMob].x && yBullet < Screen.mobs[shotMob].y){ distanceX = Screen.mobs[shotMob].x- xBullet; distanceY = Screen.mobs[shotMob].y - yBullet; sep = Math.sqrt( (distanceX * distanceX) + (distanceY * distanceY)); scale = // This is the part I am confused about. xBullet += distanceX * scale; yBullet += distanceY * scale; Thanks!
0
[ 2, 8247, 1710, 1882, 6699, 19644, 800, 3726, 3726, 64, 15, 3531, 42, 26, 741, 154, 85, 20, 448, 55, 9, 31, 589, 749, 20, 2803, 21, 284, 8247, 172, 43, 1710, 1882, 250, 17, 31, 57, 485, 77, 1716, 749, 20, 18469, 184, 20, 107, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
deltatime and divisions === I have a strange problem in my code which I ported from actionscript to c++. I made simple rope physics which totaly spin out of control when I use them in c++. I'm pretty sure it has to do with the conversion from timers in actionscript to deltatime in c++. I have a value which I divide by the friction value I have, like so: x[i] += hspd/friction; I tried applying deltatime to it like this: x[i] += hspd/pow(friction,deltaTime); but I am not sure I'm doing this right, can someone please tell me if this is right or how this is done properly?
0
[ 2, 6395, 891, 17, 5519, 800, 3726, 3726, 31, 57, 21, 2578, 1448, 19, 51, 1797, 56, 31, 1295, 69, 37, 1028, 8741, 20, 272, 20512, 9, 31, 117, 1935, 6818, 4339, 56, 600, 93, 3310, 70, 16, 569, 76, 31, 275, 105, 19, 272, 20512, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 use an API key and secret? === I came across many APIs that give the user both an API **key** and a **secret**. But my question is: what is the difference between both? In my eyes, one key can be enough. Say I have a key and only I and the server know it. I create a HMAC hash with this key and do an API call. On the server, we create the HMAC hash again and compare it with the sent hash. If it's the same, the call is authenticated. So why use two keys? **Edit:** or is that API key used to lookup the API secret?
0
[ 2, 483, 275, 40, 21, 2159, 1246, 17, 1699, 60, 800, 3726, 3726, 31, 281, 464, 151, 21, 8954, 30, 590, 14, 4155, 156, 40, 21, 2159, 13, 1409, 4237, 1409, 17, 21, 13, 1409, 17902, 1409, 9, 47, 51, 1301, 25, 45, 98, 25, 14, 284...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 delete a connection in draw2d? === I want to know how I delete a connection in draw2d. I tried disconnect() method but dose not seems to be work. This is my code menu.appendMenuItem(new draw2d.MenuItem("Disconnect", null, function() { //draw2d.Connection.workflow.removeFigure(draw2d.Connection.prototype); var cmd = new draw2d.CommandDelete(oThis); oThis.workflow.getCommandStack().excute(cmd); })); here oThis is of type "draw2d.Connection". please help.
0
[ 2, 184, 20, 27448, 21, 2760, 19, 2003, 135, 43, 60, 800, 3726, 3726, 31, 259, 20, 143, 184, 31, 27448, 21, 2760, 19, 2003, 135, 43, 9, 31, 794, 29363, 5, 6, 2109, 47, 11654, 52, 2206, 20, 44, 170, 9, 48, 25, 51, 1797, 11379,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
prevent parent page from loading inside jquery dialog box on button click === I have a jquery dialog box that loads a php file (shopping_cart_temp.php) via ajax. The php file has 3 ajax buttons, remove, add 1, or minus 1. The href for all 3 buttons is #. The problem is, when I click on any of the 3 ajax buttons, the parent page loads inside the jquery dialog box instead of completing the ajax button action. After doing some research I found that it could be because event.preventDefault or onclick=return false; are not present or not working. I can see this question or similar questions has been asked many times, but each solution I tried didn't work for me. Can you help me solve this please? function osc_cart(path) { var me = this; me.path = path; var pid; var options; /** * Functions specific to filtering information from input boxes */ this.getID = function(idName) { var pat = /id\[(\d*)\]/; var matches = pat.exec(idName); return matches[1]; } this.setProductFromInput = function() { // Link that was passed back. Extract product id. me.pid = $(this).siblings("input[name=products_id]").val(); var selected = $('select[name^=id]'); me.options = new Object(); for (var i = 0; i < selected.length; i++) { var selOptions = $('option:selected', selected[i]); // extract the number from id. var idNo = me.getID(selected[i].name) me.options[idNo] = selOptions.val(); } me.addItemToCart(); return false; } /** * Ids the links that will add the product to cart. */ this.id_inputs = function(index) { var patAddToCart = / Add to Cart /; return this.title.match(patAddToCart); } /** * Functions specific to adding AJAX shopping cart functionality to links */ this.id_links = function(index) { var pat1 = /action=buy_now/; return this.href.match(pat1); } /** * Basic functionality common to add items to cart as well as allow users * to select attributes */ this.getItemAttributes = function() { // Link that was passed back. Extract product id. var pat = /products_id=(\d*)/; var matches = pat.exec(this.href); me.pid = matches[1]; me.options = new Object(); $.get(me.path + 'actions.php?method=product_options&pid=' + me.pid, me.getItemAttributesCB); return false; } this.getItemAttributesCB = function(data) { var attributes; try { attributes = $.parseJSON(data) } catch (err) { me.onError(err); return false; } // if no attributes go straight to add to cart. if ( attributes.result != null ) { me.addItemToCart(); return; } // Reset cart. $('.cart_status').html(''); // Set up the combo boxes for users to select the product options for (var i = 0; i < attributes.length; i++) { var idTxt = 'id[' + attributes[i].id + ']'; $('.cart_status').append(attributes[i].text + ': <select name="' + attributes[i].id +'" + id="' + idTxt + '"></select>'); for (var j = 0; j < attributes[i].values.length; j++) { $('select', $('.cart_status')).last().append('<option value="' + attributes[i].values[j].id + '">' + attributes[i].values[j].text + '</option>'); } } // Add button. $('.cart_status').dialog({ buttons: { 'Ok' : me.setProductFromDialog }}); $('.cart_status').dialog( "option", "dialogClass", 'alert' ) $('.cart_status').dialog('option', 'title', 'Product Options'); $('.cart_status').dialog('open'); } this.setProductFromDialog = function() { var selected = $('select', $('.cart_status')); for (var i = 0; i < selected.length; i++) { var selOptions = $('option:selected', selected[i]); me.options[selected[i].name] = selOptions.val(); } me.addItemToCart(); return false; } this.addItemToCart = function() { $.post(me.path + 'actions.php', { method: "add_to_cart", pid: me.pid, id : me.options}, me.addItemToCartCB); $('.cart_status').dialog({ buttons: null}); $('.cart_status').html('<img style="vertical-align:middle" src="' + me.path + 'images/loading.gif" />&nbsp; Adding item to cart'); $('.cart_status').dialog('open'); $('.cart_status').dialog('option', 'title', ''); $('.cart_status').dialog("option", "position", "center"); return false; } this.addItemToCartCB = function(data) { var retObj; try { retObj = $.parseJSON(data); } catch (err) { me.onError(err); return false; } $('.cart_status').html('<div class="cart-updated-head">Added to cart :</div>'); $.get('shopping_cart_temp.php', function(result){ $('.cart_status').append('<p class="json-productname">' + result ); }); $('.cart_status').append('<p class="json-productname">' + retObj.product_name ); if (retObj.options != '') { for ( var opt in retObj.options) { $('.cart_status').append('<div style="font-size:.8em;padding-left:1em"><em> - ' + opt + ':' + retObj.options[opt] + '</em></div>'); } } $('.cart_status').append('</p>'); $('.cart_status').dialog('option', 'title', 'Shopping Cart Updated'); $('.cart_status').dialog( { buttons: { 'Continue Shopping' : function() { $('.cart_status').dialog('close'); }, 'View/Modify Cart' : function() { window.location = me.path + 'shopping_cart.php'; }, 'Checkout' : function() { window.location = me.path + 'checkout_shipping.php';} } }); $('.cart_status').dialog("option", "position", ['center',200]); //$('.cart_status').dialog("option", "position", "center"); me.requestCartContents(); } /** * Updates and loads the cart contents */ this.requestCartContents = function() { $.get(me.path + 'actions.php?method=get_cart_summary', me.requestCartContentsCB); } this.findShoppingCart = function() { var shoppingCart = $('.infoBox').filter(me.id_shoppingcart); var shoppingCartTable = shoppingCart.find('.infoBoxContents').first(); return shoppingCartTable; } this.requestCartContentsCB = function(data) { var obj; try { obj = $.parseJSON(data); } catch (err) { me.onError(err); return false; } var count = 0; for ( var productName in obj.contents ) count += obj.contents[productName].qty; var itemStr = 'item'; if (count > 0) { if (count > 1) itemStr += 's'; $(".shopping_cart").css('display', 'block'); $(".summary").html( count + ' ' + itemStr + ' $' + obj.total ); } // Add items to shopping cart dialog box. // Clear HTML // Look for an infobox where the infoboxHeading is equal to Shopping cart var shoppingCartTable = me.findShoppingCart(); var text = ''; // Add Spacing text += '<tr><td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td></tr>'; // Add Items text += '<tr><td><table border="0" width="100%" cellspacing="0" cellpadding="0">'; for (var productName in obj.contents) { // Add Product Qty text += '<tr><td align="right" valign="top" class="infoBoxContents">'; text += '<span class="'; text += (obj.contents[productName].updated) ? "newItemInCart" : "infoBoxContents"; text += '">'; text += obj.contents[productName].qty; text += '&nbsp;x&nbsp;</span></td><td valign="top" class="infoBoxContents">'; // Add Product No text += '<a href=' + me.path + '/product_info.php?products_id=' + productName + '>'; text += '<span class="'; text += (obj.contents[productName].updated) ? "newItemInCart" : "infoBoxContents"; text += '">'; text += obj.contents[productName].name; text += '</span></a></td></tr>'; } text += '</table></td></tr>'; // Add Line text += '<tr><td class="boxText"><img src="images/pixel_black.gif" border="0" alt="" width="100%" height="1"></td> </tr>'; // Add Total text += '<tr><td align="right" class="boxText">'; text += '<span class="newItemInCart">'; text += obj.total + '</span></td></tr>' ; // Add Spacing text += '<tr><td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td></tr>'; shoppingCartTable.html(text); } this.id_shoppingcart = function(index) { // !! Change "Shopping Cart" to your shopping cart title. var patShoppingCart = /Shopping Cart/; if ( $(this).prev() == null || $(this).prev().html() == null) return false; return $(this).prev().html().match(patShoppingCart); } this.onError = function(err) { $('.cart_status').html('<p>' + err + '</p>'); $('.cart_status').dialog('option', 'title', 'Error'); $('.cart_status').dialog( { buttons: { 'OK' : function() { $('.cart_status').dialog('close'); } } }); $('.cart_status').dialog("option", "position", "center"); $('.cart_status').dialog('open'); } // Initializes the class. this.osc_init = function() { // add to cart inputs $('input').filter(me.id_inputs).click(me.setProductFromInput); // add to cart link $('a').filter(me.id_links).click(me.getItemAttributes); // add to cart dialog boxes. $('body').append('<div class="cart_status" style="display:none"></div>'); $('.cart_status').dialog( { "autoOpen":false, "draggable":false, "resizable":false, "modal":true } ); // Add mouse over handler to what we added. //$('body').append('<div class="cart_contents" style="display:none"></div>'); //$('.cart_contents').dialog( // { // autoOpen:false, // draggable:false, // resizable:false, // title:'Shopping Cart Contents' // } //); //var link = $('a', $('#menuNavigation')).filter(function() { return this.href.indexOf('shopping_cart.php') != -1;} ); //link.mouseover(function() { $('.cart_contents').dialog('open') } ); } }
0
[ 2, 2501, 4766, 2478, 37, 12797, 572, 487, 8190, 93, 28223, 1649, 27, 5167, 10840, 800, 3726, 3726, 31, 57, 21, 487, 8190, 93, 28223, 1649, 30, 19069, 21, 13, 26120, 3893, 13, 5, 18, 21181, 1, 1367, 38, 1, 9577, 9, 26120, 6, 1197...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Injecting Commands into ViewModels === I'm trying to figure out what is the right way to inject an `ICommand` into my ViewModel. Given that my ViewModel looks like this. public class ViewModel : IViewModel { ICommand LoadCommand { get; } ICommand SaveCommand { get; } } I currently do this in my constructor public ViewModel(IRepository repository, IErrorLog errorLog, IValidator validator) { LoadCommand = new LoadCommandImpl(repository, errorLog); SaveCommand= new SaveCommandImpl(repository, errorLog, validator); } Note that the parameters are not used by the ViewModel at all, aside from constructing the commands. While I try to contain as much of the logic as possible in the injected interfaces, there is still logic in the commands. It would seem more appropriate to do this public ViewModel(ICommand loadCommand, ICommand saveCommand) { LoadCommand = loadCommand; SaveCommand = saveCommand; LoadCommand.SetViewModel(this); SaveCommand.SetViewModel(this); } However to do this, I would need to make my Unity registrations like this. Which isn't the end of the world, but it seems like a pain. container.RegisterType<ICommand, LoadCommand("loadCommand"); container.RegisterType<ICommand, SaveCommand("saveCommand"); container.RegisterType<IViewModel, ViewModel>( new InjectionConstructor( new ResolvedParamer<ICommand>("loadCommand"), new ResolvedParamer<ICommand>("SaveCommand"))); Alternatively, I could make `ILoadCommand` and `ISaveCommand` interfaces, but these interfaces would be empty or might implement `ICommand`. I'm not a huge fan of any of these solutions. What is the recommended approach here?
0
[ 2, 20316, 68, 14294, 77, 1418, 13998, 18, 800, 3726, 3726, 31, 22, 79, 749, 20, 1465, 70, 98, 25, 14, 193, 161, 20, 20316, 40, 13, 1, 49, 16239, 1, 77, 51, 1418, 13998, 9, 504, 30, 51, 1418, 13998, 1879, 101, 48, 9, 317, 718...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails i18n not finding my custom error message === What's wrong with my locale: I'm getting: Hotel translation missing: pt-BR.activemodel.errors.models.hotel_selector.attributes.id.must_be_filled And my yml is like this: pt-BR: activemodel: attributes: csv_invite: file_path: Arquivo group_id: Grupo hotel_selector: id: Hotel errors: models: hotel_selector: id: must_be_filled: deve ser preenchido What am I doing wrong?
0
[ 2, 2240, 18, 31, 1087, 103, 52, 3007, 51, 5816, 7019, 2802, 800, 3726, 3726, 98, 22, 18, 1389, 29, 51, 375, 62, 45, 31, 22, 79, 1017, 45, 1454, 4064, 2863, 45, 12923, 8, 5145, 9, 7889, 13998, 9, 29992, 18, 9, 13998, 18, 9, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
$('#id').toggle() is changing style="display:none" to style="" instead of the desired style="display:inline" === I have: <a id = "button" style="display:inline"></a> <a id = "buttonPressed" style="display:none"></a> And I'm using $('#button, #buttonPressed').click(function(event){ $('#button, #buttonPressed').toggle(); //Do other stuff }) The "display:inline" button is getting changed to "display:none" as desired, but the "display:none" button is changing to style="" instead of the desired "display:inline". How do I address this?
0
[ 2, 5579, 5, 22, 5910, 1340, 22, 6, 9, 262, 263, 4875, 5, 6, 25, 4226, 1034, 3726, 7, 2906, 5438, 45, 15746, 7, 20, 1034, 3726, 7, 7, 700, 16, 14, 9264, 1034, 3726, 7, 2906, 5438, 45, 108, 1143, 7, 800, 3726, 3726, 31, 57, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Populate an asp.net Gridview dynamically with List<T> === I have a list of Employee records being returned in a List<T> format. How can I populate a gridview dynamically? ePremiumSubscriber.Subscriber PremSubData = new ePremiumSubscriber.Subscriber(); List<ePremiumSubscriber.Subscriber> premSubList = new List<ePremiumSubscriber.Subscriber>(); ePremiumCustomerDAL.SearchPremSubscriberData(premSubList, sqlQuery); DataTable dtSearchResults = new DataTable(); dtSearchResults.Columns.Add("psLastName", System.Type.GetType("System.String")); dtSearchResults.Columns.Add("psFirstName", System.Type.GetType("System.String"));
0
[ 2, 1675, 12383, 40, 28, 306, 9, 2328, 7354, 4725, 7782, 1326, 29, 968, 1, 38, 1, 800, 3726, 3726, 31, 57, 21, 968, 16, 7362, 742, 142, 587, 19, 21, 968, 1, 38, 1, 2595, 9, 184, 92, 31, 1675, 12383, 21, 7354, 4725, 7782, 1326...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Windows 8: How to bring specific window to forefront? === How do I bring the Word Spell Checker window to the forefront in IE8? In IE7, the Word Spell Checker is always render at the forefront, but not in IE8 with the same code.
0
[ 2, 1936, 469, 45, 184, 20, 1499, 1903, 1463, 20, 24850, 60, 800, 3726, 3726, 184, 107, 31, 1499, 14, 833, 4762, 2631, 106, 1463, 20, 14, 24850, 19, 13, 660, 457, 60, 19, 13, 660, 465, 15, 14, 833, 4762, 2631, 106, 25, 550, 165...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
How to use errorPlacement on one element === I am using jQuery Validation plugin for a form. When the form is not validated, I am getting the correct error message, I would just like to place it in another location. Right now the error label is showing up under the first checkbox label(Check 1). I would like to appear in the #messageBox div. This is what I thought would work....but it doesn't :( **html:** <div class="form_row"> <div class="buttonColumn"> <label><input type="checkbox" name="program[]" class="isChecked error">Check 1</label> <label><input type="checkbox" name="program[]" class="isChecked error">Check 2</label> <label><input type="checkbox" name="program[]" class="isChecked error">Check 3</label> <label><input type="checkbox" name="program[]" class="isChecked error">Check 4</label> </div> <div id="messageBox"></div> **jQuery:** $('#custom_form').validate({ rules: { "program[]": { required:true, minlength:1, }, errorPlacement: function(error, element) { if (element.attr("program[]") == "program[]") { error.appendTo('#messageBox'); } }, messages: { "program[]": "Please choose a program.", } });
0
[ 2, 184, 20, 275, 7019, 5119, 1130, 27, 53, 4520, 800, 3726, 3726, 31, 589, 568, 487, 8190, 93, 27999, 10922, 108, 26, 21, 505, 9, 76, 14, 505, 25, 52, 7394, 1669, 15, 31, 589, 1017, 14, 4456, 7019, 2802, 15, 31, 83, 114, 101, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Variable generic return type in C# === is there anyway to have a method return any one of a number of generic types from a method. For example, i have the following: public static T ParseAttributeValue<T>(this XElement element, string attribute) { if(typeof(T) == typeof(Int32)) { return Int32.Parse(element.Attribute(attribute).Value); } if(typeof(T) == typeof(Double)) { return Double.Parse(element.Attribute(attribute).Value); } if(typeof(T) == typeof(String)) { return element.Attribute(attribute).Value; } if(typeof(T) == typeof(ItemLookupType)) { return Enum.Parse(typeof(T), element.Attribute(attribute).Value); } } (This is only a very quick mockup, im aware that any production code would need to be significantly more thorough in null checks etc...) But the compiler doesnt like it, complaining that Int32 cannot be implicitly converted to T (it doesnt work with a cast either). I can understand that. At compile time it has no way to know what T is, but im checking it before hand. Is there anyway i can make this work?
0
[ 2, 7612, 12733, 788, 1001, 19, 272, 5910, 800, 3726, 3726, 25, 80, 2774, 20, 57, 21, 2109, 788, 186, 53, 16, 21, 234, 16, 12733, 2551, 37, 21, 2109, 9, 26, 823, 15, 31, 57, 14, 249, 45, 317, 12038, 13, 38, 2017, 8324, 14755, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Reportviewer: Identical rows with few column values that differ..how to suppress column value in one row === I am using ReportViewer in VS 2010. The following describes the scenario: Table A has 5 columns Col1 Col2 Col3 Col4 Col5 Row1 A B D F G Row2 A C D F G Row 3 1 2 3 4 5 Row 4 1 2 3 10 5 I would like this displayed as: Col1 Col2 Col3 Col4 Col5 Row1 A B D F G Row2 C Row3 1 2 3 4 5 Row4 10 I would like to suppress values that repeat. Can someone please provide suggestions? Thanks very much.
0
[ 2, 1330, 4725, 106, 45, 6323, 11295, 29, 310, 4698, 4070, 30, 11394, 9, 9, 1544, 20, 12451, 4698, 1923, 19, 53, 3131, 800, 3726, 3726, 31, 589, 568, 1330, 4725, 106, 19, 4611, 498, 9, 14, 249, 4359, 14, 12705, 45, 859, 21, 63, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Redirect all request to controller php === I was thinking about routing engine in my project, and im trying for some weeks to redirect all queries by single htaccess, which in the root dir, but when im trying to open directory that already exists, i have to add in each denied folder access rules. So the question is : *Can i by usual htaccess catch all request to all folders, and give access only throught controller file?* > Ps sorry for my Engl:)
0
[ 2, 302, 14706, 65, 3772, 20, 9919, 13, 26120, 800, 3726, 3726, 31, 23, 1440, 88, 19880, 1406, 19, 51, 669, 15, 17, 797, 749, 26, 109, 1342, 20, 302, 14706, 65, 9386, 2829, 34, 345, 13, 9020, 20604, 15, 56, 19, 14, 5900, 13, 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...
Add Line Break in text file android === Hi All I am using this code to append text in a txt file.anyone can guide me how i can add line break for this case fOut = new FileOutputStream(new File(myFilePath + BlueFreeConstants.logFileName), true); osw = new OutputStreamWriter(fOut); osw.append("<< " + values + " >>"); osw.flush(); osw.close(); fOut.close();
0
[ 2, 3547, 293, 1442, 19, 1854, 3893, 13005, 800, 3726, 3726, 4148, 65, 31, 589, 568, 48, 1797, 20, 4865, 2451, 1854, 19, 21, 20225, 38, 3893, 9, 6001, 849, 92, 3378, 55, 184, 31, 92, 3547, 293, 1442, 26, 48, 610, 398, 1320, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
getting data from servlet class === I have a class that gets data from the servlet like so : protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html");{ ServletOutputStream out = response.getOutputStream(); try { out.println("<html><head><title>" + "</title></head>"); out.println("<body><h1>" + "</h1>"); name = request.getParameter("username" ); message = "hi there"; //String comment = request.getParameter( "comment" ); out.println("Name:" + name + "<BR>"); //out.println("Comment: " + comment + "<BR>"); } catch(Throwable t ) { out.println("<P><pre>"); t.printStackTrace( new PrintStream(out) ); out.println ("</pre><P>"); } out.println ("</body></html>"); } } And that works fine, but I want to use the name parameter in a different class on the server too. Can I use something like : getServletContext().setAttribute("package", "name"); And call the attribute from the class like that? Or is there another way I can save the value in the servlet context or in the servlet so I can call it again? all i really want to do is after the servlet is loaded, to keep the last value it's processed somewhere and use that in another class when needed. All Help is appreciated!! :)
0
[ 2, 1017, 1054, 37, 13, 10321, 1336, 718, 800, 3726, 3726, 31, 57, 21, 718, 30, 3049, 1054, 37, 14, 13, 10321, 1336, 101, 86, 13, 45, 3803, 11364, 107, 3060, 5, 21127, 10321, 1336, 99, 10351, 3772, 15, 7775, 10321, 413, 8722, 8782,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 can I pass custom data my buyer input as a passthrough variable to PayPal directly? === My scenario is: 1)user input some custom data 2)he press "buy now" button,then send the custom data to PayPal. 3)After his payment,retrieve his custom data in PayPal IPN handler. At this point,I want to pass the custom data as a pass-through variable to PayPal. <input type="text" name="custom" /> Is it possible? Can I retrieve this value in my IPN handler? If impossible,how can I pass custom data my buyer input as a passthrough variable to PayPal? Welcome to anyone who have a good solution? Thanks.
0
[ 2, 184, 92, 31, 1477, 5816, 1054, 51, 20651, 6367, 28, 21, 1477, 11639, 7612, 20, 1372, 6720, 1703, 60, 800, 3726, 3726, 51, 12705, 25, 45, 137, 6, 16704, 6367, 109, 5816, 1054, 172, 6, 438, 901, 13, 7, 2345, 93, 130, 7, 5167, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
editable list preference in android 2.2 === Is there an easy way to create and editable list preference in Android 2.2? by editable I mean that the user can add, remove and edit list items, similarly to wifi network list or mobile network apn list. I found this post http://xgouchet.fr/android/index.php?article4/master-on-off-preferences-with-ice-cream-sandwich but it is very android-4.x specific. thanks!
0
[ 2, 9392, 579, 968, 9808, 19, 13005, 172, 9, 135, 800, 3726, 3726, 25, 80, 40, 2010, 161, 20, 1600, 17, 9392, 579, 968, 9808, 19, 13005, 172, 9, 135, 60, 34, 9392, 579, 31, 884, 30, 14, 4155, 92, 3547, 15, 4681, 17, 9392, 968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Show and hide agrid view by clicking a button === How to show and hide a grid view in a wep page by clicking a same button or an image button every time. Or by adding two button like show and hide how to make a grid visible and invisible every time on clicking the button.
0
[ 2, 298, 17, 3077, 21, 16375, 1418, 34, 25590, 21, 5167, 800, 3726, 3726, 184, 20, 298, 17, 3077, 21, 7354, 1418, 19, 21, 95, 306, 2478, 34, 25590, 21, 205, 5167, 54, 40, 1961, 5167, 352, 85, 9, 54, 34, 4721, 81, 5167, 101, 298...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 identify a person as a driver (not passenger) if he is in a car? === The problem here is to identify the position of person driving a car using GPS or by any means if possible (This is not applicable if the person is on passenger seats). If I can somehow communicate between car's GPS and the phone but I don't know if it is possible. Do you guys have any idea how to achieve this? Thanks
1
[ 2, 25, 32, 938, 20, 5808, 21, 840, 28, 21, 2425, 13, 5, 1270, 3093, 6, 100, 24, 25, 19, 21, 349, 60, 800, 3726, 3726, 14, 1448, 235, 25, 20, 5808, 14, 649, 16, 840, 2891, 21, 349, 568, 18298, 54, 34, 186, 1108, 100, 938, 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...
Crystal-reports (SAP BI) and Win Form (VB.net) integration issue: Matched Records not found, while from Report UI data is displayed === My Window Application (Win Form, Vb.net and netfx 2.0, VS 2008) integrate rpt files developed in Crystal Report 2008. The data source for these RPT is SAP BI. Data is displayed from Crystal Report 2008 UI with the connection and parameters, which are being sent from Windows Application, but no data is retrieved from SAP by my Window Application. We have serialized the connection Info, Table Info and Parameters in to a text file just before "reportDocument" is assigned to ReportViewer. With these Details we are able to get data through Crystal Report UI. Code Dim crReportDocument As New ReportDocument() crReportDocument.Load(GetReportPath(), OpenReportMethod.OpenReportByDefault) SetParameters(crReportDocument) AssignConnection(crReportDocument) ''Before Assigning to just print on text file --here serialization code goes... CrystalReportViewer1.ReportSource = crReportDocument crReportDocument.Dispose() SetParameters(crReportDocument) Code Private Sub SetParameters(ByRef rptDocument As ReportDocument) Dim ParamField As CrystalDecisions.Shared.ParameterField Dim currentValues As CrystalDecisions.Shared.ParameterValues Dim newValue As CrystalDecisions.Shared.ParameterDiscreteValue Dim newRangeValue As CrystalDecisions.Shared.ParameterRangeValue Dim objRangeData As RangeData Dim TempParamName As String For Each paramItem As ParameterFieldDefinition In rptDocument.DataDefinition.ParameterFields currentValues = paramItem.CurrentValues currentValues.Clear() If (paramItem.DiscreteOrRangeKind = DiscreteOrRangeKind.DiscreteValue) Then newValue = New CrystalDecisions.Shared.ParameterDiscreteValue() newValue.Value = _paramFields(TempParamName) currentValues.Add(newValue) Else newRangeValue = New CrystalDecisions.Shared.ParameterRangeValue() objRangeData = CType(_paramFields(TempParamName), RangeData) newRangeValue.StartValue = objRangeData.StartValue newRangeValue.EndValue = objRangeData.EndValue currentValues.Add(newRangeValue) End If paramItem.ApplyCurrentValues(currentValues) Next End Sub AssignConnection(crReportDocument) Code Private Sub AssignConnection(ByRef rptDocument As ReportDocument) 'This should be load from Database or Application configuration Dim connection As ConnectionInfo connection = GetConnectionInfo() rptDocument.Database.Tables(0).LogOnInfo.ConnectionInfo = connection ' Now loop through all the sections and its objects to do the same for the subreports For Each section As CrystalDecisions.CrystalReports.Engine.Section In rptDocument.ReportDefinition.Sections ' In each section we need to loop through all the reporting objects For Each reportObject As CrystalDecisions.CrystalReports.Engine.ReportObject In section.ReportObjects If reportObject.Kind = ReportObjectKind.SubreportObject Then Dim subReport As SubreportObject = DirectCast(reportObject, SubreportObject) Dim subDocument As ReportDocument = subReport.OpenSubreport(subReport.SubreportName) subDocument.Database.Tables(0).LogOnInfo.ConnectionInfo = connection End If Next Next End Sub --Serialized Details Table Details- Name:ZMULSALIN_ZMULSALIN_Q0006, , Location:ZMULSALIN/ZMULSALIN_Q0006, ConnectionInfo: pwd->pwd123, user->cruser, server->dev01, DatabaseName->CLIENT=120 LANG=EN ASHOST=dev01 SYSNR=05 USER=cuuser R3NAME=BD0 RPT File-> rassdk://… \Reports\abcanalysis.rpt Param Details: Name:[0DAT], CurrentValues:24.02.2012 Name:V_Duration, CurrentValues:07.2011 Name:V_Code, CurrentValues:1115 ----- With above Login and Parameters, data is available and displayed using Crystal 2008 UI, and MULSALIN_ZMULSALIN_Q0006 table is active in SAP. Need suggestion, what is missed, where to diagnose now?
0
[ 2, 4282, 8, 17437, 18, 13, 5, 18, 2552, 1732, 6, 17, 628, 505, 13, 5, 20468, 9, 2328, 6, 8078, 1513, 45, 11265, 742, 52, 216, 15, 133, 37, 1330, 13, 5661, 1054, 25, 6115, 800, 3726, 3726, 51, 1463, 3010, 13, 5, 4181, 505, 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...
WCF: custom roleProvider: How to debug it? === I have a custom role provider that inherits off RoleProvider. In the web app this works fine with no problems. However I am also using it in the WCF service and am having great problems stepping into it. to the extent that I suspect it isn't being hit at all. If I turn on any principal permissions at all I get access denied and the stack trace is totally unhelpful. even the WCF traces arnt really helpful in ascertaining what has happened. I know that the TennisRoleProvider works off its default constructor and have verified its methods via test. It seems to be an integration issue. So snippets ... (have ommited things i know work - eg certificates and userNameValidator) <roleManager defaultProvider="TennisRoleProvider" enabled="true" > <providers> <clear/> <add name="TennisRoleProvider" type="Tennis.Security.TennisRoleProvider, Tennis.Security" /> </providers> </roleManager> <bindings> <wsHttpBinding> <binding name="wsHttpUserName"> <security mode="TransportWithMessageCredential"> <message clientCredentialType="UserName"/> <transport clientCredentialType="None"/> </security> </binding> </wsHttpBinding> <bindings/> <behavior name="RoleBehavior"> <serviceCredentials> <serviceCertificate findValue="john-pc" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName"/> <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Tennis.Components.TennisUserValidator, Tennis.Components"/> </serviceCredentials> <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="TennisRoleProvider"> </serviceAuthorization> <serviceMetadata httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> <errorHandler /> </behavior> <services> <service name="Tennis.Service.Services" behaviorConfiguration="RoleBehavior"> <endpoint address="Family" binding="wsHttpBinding" bindingConfiguration="wsHttpUserName" contract="Tennis.Service.Contracts.IFamilyAdmin" /> </service> </services> Then on the service method i have the following (Roles.Family admin is a string) [PrincipalPermission(SecurityAction.Demand, Name = Roles.FamilyAdmin)] public VoidResult<SuccessEnum> UpdateFamily(Family family) { } so there are 2 questions ... 1) what have I done wrong? 2) How can I get into WCF to figure out exactly what is going wrong? Cheers
0
[ 2, 11801, 410, 45, 5816, 597, 26735, 139, 45, 184, 20, 121, 16254, 32, 60, 800, 3726, 3726, 31, 57, 21, 5816, 597, 11747, 30, 17569, 18, 168, 597, 26735, 139, 9, 19, 14, 2741, 4865, 48, 693, 1123, 29, 90, 1716, 9, 207, 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...
generating a string from database values in cakephp === i have a table called merchants in my database, in that table i have the field named merchant_code, and i want to generate a 8 code for my field in such a way that the first two characters contains the first two letters from my state_name from states table and next two characters contains first two letters from my city_name from cities table, and the last four characters should contain digits starting from ooo1. at the time of adding the merchant i want this code to automatically add, and save in my database i'm a beginner in cakehp, so please give me answer briefly, would be thankful if i found the solution
0
[ 2, 13500, 21, 3724, 37, 6018, 4070, 19, 8390, 26120, 800, 3726, 3726, 31, 57, 21, 859, 227, 11030, 19, 51, 6018, 15, 19, 30, 859, 31, 57, 14, 575, 377, 5080, 1, 9375, 15, 17, 31, 259, 20, 7920, 21, 469, 1797, 26, 51, 575, 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...
could not find compatible versions for gem "multi_json": === I try to run the server but this result always appear to me could not find compatible versions for gem "multi_json": In Gemfile: rails (= 3.2.6) ruby depends on multi_json (~> 1.0) ruby I have rails 3.2.6 I try to use bundle update but the same result
0
[ 2, 110, 52, 477, 14961, 3281, 26, 8551, 13, 7, 21531, 1, 728, 528, 7, 45, 800, 3726, 3726, 31, 1131, 20, 485, 14, 8128, 47, 48, 829, 550, 1893, 20, 55, 110, 52, 477, 14961, 3281, 26, 8551, 13, 7, 21531, 1, 728, 528, 7, 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...
How do I start Jetty8 to only serve static content? === For testing purposes I want to use Jetty 8 to serve only static content. I know how to start the webserver from the command line: > java -jar start.jar jetty.port=8082 I would like to be able to use a vanilla Jetty, preferably 8 or 7, and start it using something like: > java -jar start.jar OPTIONS=resources resources.root=../foo jetty.port=8082 The files should then be accessible from the root of the server. A file called <code>../foo/x.html</code> should be accessible via <code>http://localhost:8082/x.html</code>. I don't want to create a WAR file or anything fancy. Preferably it shouldn't do any caching on the server side, leaving the files unlocked on Windows machines. Also, I only want to serve files, even located in subdirectories, no fancy file browser or ways to modify them from a client. Is this possible? If not, what is the minimum configuration needed to accomplish such behavior?
0
[ 2, 184, 107, 31, 799, 17341, 93, 457, 20, 104, 1884, 12038, 2331, 60, 800, 3726, 3726, 26, 4431, 4612, 31, 259, 20, 275, 17341, 93, 469, 20, 1884, 104, 12038, 2331, 9, 31, 143, 184, 20, 799, 14, 2741, 10321, 106, 37, 14, 1202, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Check in C# if a CSV file is a DOS-CSV or not === How can I check with C# if a CSV-File is a DOS-CSV file or a "normal" CSV file?
0
[ 2, 2631, 19, 272, 5910, 100, 21, 272, 18, 710, 3893, 25, 21, 107, 18, 8, 6824, 710, 54, 52, 800, 3726, 3726, 184, 92, 31, 2631, 29, 272, 5910, 100, 21, 272, 18, 710, 8, 16877, 25, 21, 107, 18, 8, 6824, 710, 3893, 54, 21, 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, 0, 0, 0, 0, 0, 0, 0...
CustomAdapter with multiple getView in android === I have an activity, where in i display list of media files i.e Video, Audio, Images and Animations. On clicking the list item, (as of now Images), the activity must display all the images in the local assets folder in grid View. To do so, i use a single adapter and have a switch case in my getView() function. Depending on the options that is set in the constructor, the switch cases would execute. It works fine for the ListView display, but i am unable to display list of images in grid View. Any help would be apprecaited. Thanks in advance. Here is my code: package com.bookshelf; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.ThumbnailUtils; import android.os.Bundle; import android.provider.MediaStore; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.Gallery; import android.widget.GridView; import android.widget.ImageView; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class MediaGalaryListActivity extends Activity implements OnItemClickListener { private ArrayList<String> mGalary = new ArrayList<String>(); private Bitmap mBitArray[]; private Gallery mMediaGallery; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mediagalary); mGalary.add("Videos"); mGalary.add("Audios"); mGalary.add("Images"); mGalary.add("Animation"); ListView lv = (ListView) findViewById(R.id.mediaGal); mMediaGallery = (Gallery) findViewById(R.id.mediaGallery); lv.setAdapter(new MediaGalaryAdapter(this, mGalary, 1)); lv.setOnItemClickListener(this); } class MediaGalaryAdapter extends BaseAdapter { private ArrayList<String> mGal = new ArrayList<String>(); private Bitmap[] mImgArray; private Context context; private LayoutInflater mInflate; private int mAdapterOpt; public MediaGalaryAdapter(Context ctx, ArrayList<String> gal, int adapOpt) { context = ctx; mGal = gal; mAdapterOpt = adapOpt; mInflate = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public MediaGalaryAdapter(Context ctx, Bitmap[] imgArray, int adapOpt) { context = ctx; mImgArray = imgArray; mInflate = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); mAdapterOpt = adapOpt; } public int getCount() { int size = 0; switch (mAdapterOpt) { case 1: size = mGal.size(); break; case 2: size = mImgArray.length; break; } return size; } public Object getItem(int position) { return null; } public long getItemId(int position) { return 0; } public View getView(int position, View convertView, ViewGroup parent) { switch (mAdapterOpt) { case 1: convertView = mInflate.inflate(R.layout.medialayout, null); TextView tv = (TextView) convertView.findViewById(R.id.text); tv.setText(mGal.get(position)); break; case 2: ImageView imgView; convertView = mInflate.inflate(R.layout.image_gallery, null); imgView = new ImageView(context); imgView.setImageBitmap(mImgArray[position]); imgView.setScaleType(ImageView.ScaleType.CENTER_CROP); imgView.setLayoutParams(new GridView.LayoutParams(100, 100)); imgView.setPadding(8, 8, 8, 8); break; } return convertView; } } // For filtering the filename with extensions class FileNamFilter implements FilenameFilter { private String mFileExtn; public FileNamFilter(String extn) { mFileExtn = "." + extn; } public boolean accept(File dir, String filename) { return filename.endsWith(mFileExtn); } } public void onItemClick(AdapterView<?> parent, View view, int pos, long id) { String mediaType = mGalary.get(pos); String list[] = null; AssetManager assetManager = getAssets(); try { list = assetManager.list("Immersive"); mBitArray = new Bitmap[list.length]; System.out.println("Length of list ="+list.length); for (int i = 0, idx = 0; i < list.length; i++) { if (list[i].endsWith(".png") || list[i].endsWith(".gif") || list[i].endsWith(".jpeg") || list[i].endsWith(".jpg")) { mBitArray[idx++] = BitmapFactory.decodeStream(assetManager .open("Immersive/" + list[i])); System.out.println("Image at position "+i+" is "+list[i]); } ; } mMediaGallery .setAdapter(new MediaGalaryAdapter(this, mBitArray, 2)); } catch (IOException e) { e.printStackTrace(); } AlertDialog.Builder build = new AlertDialog.Builder(this); build.setTitle("InProgress...."); // build.setIcon(android.R.drawable.) build.setMessage(mediaType + " is Inprogress..."); build.setPositiveButton("Ok", new OnClickListener() { public void onClick(DialogInterface dialog, int which) { // finish(); } }); AlertDialog alert = build.create(); alert.show(); // Toast.makeText(getApplicationContext(), mediaType, 30).show(); } class MediaGalary { private ImageView mImage; private TextView mName; public MediaGalary(ImageView img, TextView strName) { mImage = img; mName = strName; } public ImageView getmImage() { return mImage; } public void setmImage(ImageView mImage) { this.mImage = mImage; } public TextView getmName() { return mName; } public void setmName(TextView mName) { this.mName = mName; } } }
0
[ 2, 5816, 27576, 106, 29, 1886, 164, 4725, 19, 13005, 800, 3726, 3726, 31, 57, 40, 2358, 15, 113, 19, 31, 3042, 968, 16, 941, 6488, 31, 9, 62, 763, 15, 4023, 15, 3502, 17, 6236, 18, 9, 27, 25590, 14, 968, 9101, 15, 13, 5, 472...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 postion element "fixed" inside scrolling container === i wonder if anyone has found a solution for this? i am looking for a solution to attach an element to the top of a scrolling container HTML (pseudo-tags): <container> <header>title</header> <elem>..</elem> ... <elem>..</elem> </container> all `<elem>`s have `position:relative`, the `<container>` has the following CSS: container { position:relative; width:200px; height:400px; overflow-y:scroll; } i want the `<header>` to stay on top of the `<container>`, independant of its scrolling position and the `<elem>`'s scrolling underneath. the CSS so far: header { position:absolute; /* scrolling out of view :-( */ z-index:2; background-color:#fff; } all elements are block elements, and i can not move the header outside of the container.
0
[ 2, 272, 18, 18, 678, 872, 4520, 13, 7, 18594, 69, 7, 572, 13, 28166, 12147, 800, 3726, 3726, 31, 2666, 100, 1276, 63, 216, 21, 4295, 26, 48, 60, 31, 589, 699, 26, 21, 4295, 20, 19514, 40, 4520, 20, 14, 371, 16, 21, 13, 28166...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: GridView highlighting incorrect position when clicked === I'm trying to have a GridView of images that can be clicked to trigger various event. The GridView is supposed to automatically highlight which cell I press. The problem is that while the correct cell actually gets pressed, the highlight effect shows up on a different cell. For most (but not all) rows in the GridView the highlight occurs on the first cell in the row regardless of which cell is actually pressed. What could be causing this?
0
[ 2, 13005, 45, 7354, 4725, 23102, 18867, 649, 76, 15802, 800, 3726, 3726, 31, 22, 79, 749, 20, 57, 21, 7354, 4725, 16, 3502, 30, 92, 44, 15802, 20, 7286, 617, 807, 9, 14, 7354, 4725, 25, 2293, 20, 7499, 14373, 56, 1667, 31, 901, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Following steps to construct a DAWG results in a Trie. Why? === I'm trying to implement a set of functions that create a DAWG directly in linear time for some search functionality I'm coding for a personal project. I read [this paper][1] which happens to detail the idea behind a DAWG, and even provides pseudocode for its construction in linear time! However, following the pseudo-code seems to yield (in my eyes) a trie-like structure. Specifically, it doesn't seem that suffixes are explicitly shared (actually connected by edges in the graph). Instead they're represented by suffix pointers which don't really have a bearing on the actual traversal of the graph. For example, take a look at this picture of a DAWG for the words in the set `{tap, taps, top, tops}` (from the [DAWG Wikipedia page][2]): ![enter image description here][3] Now, compare that with the structure you get following these steps detailed in the aforementioned paper (doing it by hand with this set of words takes a negligible amount of time): Note: Edges are labeled by letters Nodes are labeled by the concatenation of the labels of the primary edges used to reach them Suffix pointers are not visually represented on the graph primary edges: solid edges used to traverse graph secondary edges: dotted edges implying a suffix relationship between the letter labeling the edge and the substring represented by the target node builddawg(S) 1. Create a node named source. 2. Let activenode be source. 3. For each word w of S do: A. For each letter 'a' of w do: Let activenode be update (activenode, a). B. Let activenode be source. 4. Return source. update (activenode, a) 1. If activenode has an outgoing edge labeled 'a', then A. Let newactivenode be the node that this edge leads to. B. If this edge is primary, return newactivenode. C. Else, return split (activenode, newactivenode). 2. Else A. Create a node named newactivenode. B. Create a primary edge labeled 'a' from activenode to newactivenode. C. Let currentnode be activenode. D. Let suflxnode be undefined. E. While currentnode isn’t source and sufixnode is undefined do: i. Let currentnode be the node pointed to by the suffix pointer of currentnode. ii. If currentnode has a primary outgoing edge labeled 'a', then let sufixnode be the node that this edge leads to. iii. Else,if currentnode has a secondary outgoing edge labeled 'a' then a. Let childnode be the node that this edge leads to. b. Let suffixnode be split (currentnode, childnode). iv. Else, create a secondary edge from currentnode to newactivenode labeled 'a'. F. If sufixnode is still undefined, let suffixnode be source. G. Set the suffix pointer of newactivenode to point to sufixnode. H. Return newactivenode. split (parentnode, childnode) 1. Create a node called newchildnode. 2. Make the secondary edge from parentnode to childnode into a primary edge from parentnode to newchildnode (with the same label). 3. For every primary and secondary outgoing edge of childnode, create a secondary outgoing edge of newchildnode with the same label and leading to the same node. 4. Set the suffix pointer of newchildnode equal to that of childnode. 5. Reset the suffix pointer of childnode to point to newchildnode. 6. Let currentnode be parentnode. 7. While currentnode isn’t source do: A. Let currentnode be the node pointed to by the suffix pointer of currentnode. B. If currentnode has a secondary edge to childnode, then make it a secondary edge to newchildnode (with the same label). C. Else, break out of the while loop. 8. Return newchildnode. The structure I get is not equivalent to that pictured above. It, in fact, looks almost identical to a trie except for the extra nodes resulting from converting secondary edges in to primary edges. The trie equivalent to the DAWG above is: ![enter image description here][4] Am I just applying the algorithm wrong, are there several types of DAWGS, or am I just misunderstanding what a DAWG is supposed to look like? Most of the papers i've looked at detailing a DAWGs have structures that seem to be created by the algorithm, but most of the materials online that i've read (and pictues i've seen) have actual edges connecting common suffixes. I don't know what to believe, or if they're actually equivalent. [1]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.9069 [2]: http://en.wikipedia.org/wiki/Directed_acyclic_word_graph [3]: http://i.stack.imgur.com/cgwuB.png [4]: http://i.stack.imgur.com/QYVmU.png
0
[ 2, 249, 2382, 20, 6960, 21, 1331, 14932, 1736, 19, 21, 2286, 62, 9, 483, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 8713, 21, 309, 16, 3719, 30, 1600, 21, 1331, 14932, 1703, 19, 6745, 85, 26, 109, 2122, 18548, 31, 22, 79, 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...
Finding a unique url from a large list of URLs in O(n) time in a single pass === Recently I was asked this question in an interview. I gave an answer in O(n) time but in two passes. Also he asked me how to do the same if the url list cannot fit into the memory. Any help is very much appreciated.
0
[ 2, 3007, 21, 2619, 287, 6362, 37, 21, 370, 968, 16, 13, 911, 7532, 19, 635, 5, 103, 6, 85, 19, 21, 345, 1477, 800, 3726, 3726, 1989, 31, 23, 411, 48, 1301, 19, 40, 2421, 9, 31, 492, 40, 1623, 19, 635, 5, 103, 6, 85, 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...
Insert on two tables MS ACCESS === Using javascript how can I insert data to the following tables: Table 1 ID Name Civil Status Table 2 ParentID Civil Status ID is an auto-number and when I insert data to table 1 I want the ID of table 1 to be the Parent ID of Table 2.
1
[ 2, 14692, 27, 81, 7484, 4235, 1381, 800, 3726, 3726, 568, 8247, 8741, 184, 92, 31, 14692, 1054, 20, 14, 249, 7484, 45, 859, 137, 4924, 204, 1038, 1782, 859, 172, 4766, 1340, 1038, 1782, 4924, 25, 40, 3108, 8, 16299, 17, 76, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why one loop is performing better then other memory wise as well as performance wise? === I have following two loops in C#, and I am running these loops for a collection with 10,000 records being downloaded with paging using "yield return" First foreach(var k in collection) { repo.Save(k); } Second var collectionEnum = collection.GetEnumerator(); while (collectionEnum.MoveNext()) { var k = collectionEnum.Current; repo.Save(k); k=null; } Seems like that the second loop consumes less memory and it faster then then first loop. Memory I understand may be because of k being set to null(Even though I am not sure). But how come it faster then for each.
0
[ 2, 483, 53, 5293, 25, 2955, 574, 94, 89, 1912, 6714, 28, 134, 28, 956, 6714, 60, 800, 3726, 3726, 31, 57, 249, 81, 19661, 19, 272, 5910, 15, 17, 31, 589, 946, 158, 19661, 26, 21, 1206, 29, 6693, 742, 142, 23887, 29, 19006, 68,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Enable desktop sync for folders via Box.com API === Is it possible to programmatically enable Desktop Sync for a folder via the Box.com API? My Box application creates a folder at the root level upon installation. I'd like to this folder to be available via Desktop Sync for users who are using desktop clients.
0
[ 2, 9240, 17404, 6063, 150, 26, 19294, 18, 1197, 1649, 9, 960, 21, 2159, 800, 3726, 3726, 25, 32, 938, 20, 625, 6732, 1326, 9240, 17404, 6063, 150, 26, 21, 19294, 1197, 14, 1649, 9, 960, 21, 2159, 60, 51, 1649, 3010, 9695, 21, 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...
Pyramid: OperationalError 1054, "Unknown column 'XX' in 'field list' === When trying to access the database, I am unable to access the column. I have run the init database script multiple times. Here's the code: View from .models import Session, Admin @view_config(route_name='admin', renderer='templates/admin.pt') def admin(request): session = Session() user = authenticated_userid(request) admin = bool(session.query(Admin).filter_by(username = user).first()) message = '' if admin: if 'form.submitted' in request.params: session.add(Admin(request.params['admin'])) session.commit() message = "%s has been added as an Admin!" % request.params['admin'] return dict(url=request.route_url('admin'), message = message, ) return dict(message = message) else: return HTTPForbidden() Models class Admin(Base): __tablename__='admins' __table_args__={ 'mysql_engine':'InnoDB', 'mysql_charset':'utf8', } username = Column(String(255), ForeignKey('users.username'), primary_key=True) def __init(self, user): self.username = user
0
[ 2, 9565, 45, 5656, 29992, 332, 3963, 15, 13, 7, 1020, 2929, 4698, 13, 22, 8962, 22, 19, 13, 22, 1109, 968, 22, 800, 3726, 3726, 76, 749, 20, 1381, 14, 6018, 15, 31, 589, 2343, 20, 1381, 14, 4698, 9, 31, 57, 485, 14, 19, 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...
Multiple echoes of an include error with set_error_handler === The question is : WHY IS AN INCLUDE ERROR ECHOED 4 TIMES ? Does the system attempts 4 times to "open stream"? I did : function errorHandler($errno, $errstr, $errfile, $errline) { if ($errno == E_NOTICE ) { echo "<br/>".$errno."== E_NOTICE<br/>";} if ($errno == E_USER_NOTICE) { echo "<br/>".$errno."== E_USER_NOTICE<br/>";} if ($errno == E_DEPRECATED) { echo "<br/>".$errno."== E_DEPRECATED<br/>";} if ($errno == E_USER_DEPRECATED) { echo "<br/>".$errno."== E_USER_DEPRECATED<br/>";} if ($errno == E_STRICT) { echo "<br/>".$errno."== E_STRICT<br/>";} if ($errno == E_WARNING) { echo "<br/>".$errno."== E_WARNING<br/>";} if ($errno == E_USER_WARNING) { echo "<br/>".$errno."== E_USER_WARNING<br/>";} if ($errno == E_ERROR) { echo "<br/>".$errno."== E_ERROR<br/>";} if ($errno == E_USER_ERROR) { echo "<br/>".$errno."== E_USER_ERROR<br/>";} } set_error_handler("errorHandler"); RESULT : 2== E_WARNING 2== E_WARNING 2== E_WARNING 2== E_WARNING
0
[ 2, 1886, 20709, 16, 40, 468, 7019, 29, 309, 1, 29992, 1, 3203, 1252, 800, 3726, 3726, 14, 1301, 25, 13, 45, 483, 25, 40, 468, 7019, 10848, 268, 436, 13, 60, 630, 14, 329, 3265, 268, 436, 20, 13, 7, 10157, 3766, 7, 60, 31, 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...
xcode 4 files organization === I started a project named Opus One, and selected the Desktop as destination in Xcode. 1 month later I see on the /Desktop/OpusOne folder that there is another folder inside that is also named OpusOne. If I add a new file, it gets added the root folder, but Im curious as what could had happened. I do remember changing the project name, but this should not be a problem. Should I move all the files from the inner folder to the root folder ? ![enter image description here][1] [1]: http://i.stack.imgur.com/ZUIXx.png
0
[ 2, 993, 9375, 268, 6488, 1165, 800, 3726, 3726, 31, 373, 21, 669, 377, 13, 11686, 53, 15, 17, 1704, 14, 17404, 28, 6970, 19, 993, 9375, 9, 137, 1617, 138, 31, 196, 27, 14, 13, 118, 3196, 197, 3880, 118, 11686, 849, 19294, 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...
What is a fast way to set debugging code at a given line in a function? === Preamble: --------- R's `trace()` is a powerful debugging tool, allowing users to "insert debugging code at chosen places in any function". Unfortunately, using it from the command-line can be fairly laborious. As an artificial example, let's say I want to insert debugging code that will report the between-tick interval calculated by `pretty.default()`. I'd like to insert the code immediately after the value of `delta` is calculated, about four lines up from the bottom of the function definition. (Type `pretty.default` to see where I mean.) To indicate that line, I need to find which step in the code it corresponds to. The answer turns out to be step `list(c(12, 3, 3))`, which I zero in on by running through the following steps: as.list(body(pretty.default)) as.list(as.list(body(pretty.default))[[12]]) as.list(as.list(as.list(body(pretty.default))[[12]])[[3]]) as.list(as.list(as.list(body(pretty.default))[[12]])[[3]])[[3]] I can then insert debugging code like this: trace(what = 'pretty.default', tracer = quote(cat("\nThe value of delta is: ", delta, "\n\n")), at = list(c(12,3,3))) ## Try it a <- pretty(c(1, 7843)) b <- pretty(c(2, 23)) ## Clean up untrace('pretty.default') Question: --------- So here's my question: Is there a way to print out a function (or a parsed version of it) with the lines nicely labeled by the steps to which they belong? Alternatively, is there another easier way, from the command line, to quickly set debugging code for a specific line within a function? Addendum: --------- I used the `pretty.default()` example because it is reasonably tame, but with real/interesting functions, repeatedly using `as.list()` quickly gets tiresome and distracting. Here's an example: as.list(as.list(as.list(as.list(as.list(as.list(as.list(as.list(as.list(body(# model.frame.default))[[26]])[[3]])[[2]])[[4]])[[3]])[[4]])[[4]])[[4]])[[3]]
0
[ 2, 98, 25, 21, 1512, 161, 20, 309, 121, 16254, 2762, 1797, 35, 21, 504, 293, 19, 21, 1990, 60, 800, 3726, 3726, 782, 18260, 45, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 761, 22, 18, 13, 1, 38, 7367, 5, 6, 1, 25, 21, 2177, 121, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the purpose of Manifest file === http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html What does a manifest file do? What is the purpose of it? Manifest-Version: 1.0 Name: java/math/BigDecimal.class SHA1-Digest: TD1GZt8G11dXY2p4olSZPc5Rj64= MD5-Digest: z6z8xPj2AW/Q9AkRSPF0cg== Name: java/math/BigInteger.class SHA1-Digest: oBmrvIkBnSxdNZzPh5iLyF0S+bE= MD5-Digest: wFymhDKjNreNZ4AzDWWg1Q== Does it update these classes in the jar automatically if there any changes in the server?
0
[ 2, 98, 25, 14, 2131, 16, 13160, 3893, 800, 3726, 3726, 7775, 6903, 1004, 1385, 9, 7843, 9, 960, 118, 26051, 106, 118, 13828, 118, 1004, 1385, 19746, 3863, 118, 6300, 118, 26467, 18, 118, 8002, 9962, 9, 15895, 98, 630, 21, 13160, 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...
c++ boolean does not change/remains constant === I'll have to rely on your help again with a potential "easy" question in my non favourite language C++. The problem in short is: I initialize a boolean (to true), then i read out a file in a while loop and i change the boolean from within the while loop (at least thats what i try to do). Problem is, it does not change/remains constant. Here is the most important code: int main(int argc, char** argv){ ... boolean start = true; fastQ.open(argv[1]); while (getline(fastQ,l)){ ... if(...){ start = false; } } However, start is never set false! Do I have to use any kind of pointer to it? All pointer stuff i tried until now resulted in a compiling error, and i don't or would not understand why i cannot change the boolean as it is. Thank you for your help.
0
[ 2, 272, 20512, 9827, 413, 210, 630, 52, 753, 118, 99, 6232, 18, 3587, 800, 3726, 3726, 31, 22, 211, 57, 20, 12139, 27, 154, 448, 188, 29, 21, 2222, 13, 7, 18385, 7, 1301, 19, 51, 538, 7740, 816, 272, 20512, 9, 14, 1448, 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...
t::lib::TestApp not in CPAN? === I'm trying to install Dancer::Plugin::Feed on Mac OSX 10.6 and I'm running into this dependency problem: CPAN.pm: Going to build H/HO/HOBBESTIG/Dancer-Plugin-Feed-0.7.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Dancer::Plugin::Feed Writing MYMETA.yml and MYMETA.json ---- Unsatisfied dependencies detected during ---- ---- HOBBESTIG/Dancer-Plugin-Feed-0.7.tar.gz ---- t::lib::TestApp [build_requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running make test Delayed until after prerequisites Running make install Delayed until after prerequisites Running install for module 't::lib::TestApp' The module t::lib::TestApp isn't available on CPAN. Either the module has not yet been uploaded to CPAN, or it is temporary unavailable. Please contact the author to find out more about the status. Try 'i t::lib::TestApp'. My Perl verson: perl --version This is perl, v5.10.0 built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) I tried to figure out what the problem is without luck. Can anyone help? Thanks! B
0
[ 2, 13, 38, 45, 45, 8326, 45, 45, 10543, 7753, 52, 19, 272, 3206, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 16146, 7799, 45, 45, 18527, 5831, 45, 45, 20954, 27, 1572, 13, 759, 396, 332, 9, 379, 17, 31, 22, 79, 946, 77, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to detect a particular low memory warning level 1 or 2 or 3 through notification in ios === My app consumes memory around 70 Mb. So i need to flush it out when i've low memory warning level 1 or 2. Plz join hands
0
[ 2, 184, 20, 9092, 21, 1498, 708, 1912, 3590, 662, 137, 54, 172, 54, 203, 120, 52, 4634, 19, 13, 7760, 800, 3726, 3726, 51, 4865, 16447, 18, 1912, 140, 3201, 14023, 9, 86, 31, 376, 20, 15017, 32, 70, 76, 31, 22, 195, 708, 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, 0, 0, 0, 0, 0, 0, 0...
AUGraph setup on iOS === I am designing an AUGraph for an iOS application and would appreciate help on the following things. If I want to play a number of audio files at once, does each file need an audio unit? Which audio format is best for this as only a few formats allow for simultaneous playback with hardware accelerated performance. Is AAC an optimal format for this? Can an audio unit in an AUGraph be inactive? If an AUGraph looks like this Speaker/output < recorder unit < mixer unit < number of audio file playing units what happens if the recorder is not active, would it still pull, but just not write the buffers to a file?
0
[ 2, 10343, 9614, 18161, 27, 13, 7760, 800, 3726, 3726, 31, 589, 15026, 40, 10343, 9614, 26, 40, 13, 7760, 3010, 17, 83, 8831, 448, 27, 14, 249, 564, 9, 100, 31, 259, 20, 418, 21, 234, 16, 4023, 6488, 35, 382, 15, 630, 206, 3893...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C# write data to a file using a file format and fill string with spaces === can someone give me an example what the easiest ans best way would be to create a text file based on a specific format. I have the following example: Field : Pos : Length Version : 1 : 2 Creator : 3 : 4 Value : 7 : 10 ... One line represents one data row in the file. If a field is less than the length specified in the format, it should be filled with spaces. So my question is, should I create a class containing char arrays and serialize it. If yes, whats the easiest way to fill some parts with spaces. Or do you have another idea and can give an example how I should do it in C#... Thanks!
0
[ 2, 272, 5910, 2757, 1054, 20, 21, 3893, 568, 21, 3893, 2595, 17, 3509, 3724, 29, 7644, 800, 3726, 3726, 92, 737, 590, 55, 40, 823, 98, 14, 27237, 40, 18, 246, 161, 83, 44, 20, 1600, 21, 1854, 3893, 432, 27, 21, 1903, 2595, 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...
How to solve: Why is coreData(NSFetchedResultsController) sorting differently in iOS5 and iOS4 === i have a tableview which is populated with NSFetchedResultsController. On `didSelectRowAtIndexPath`i am updating the current `row`. The sorting here should not change. The difference in the selected row is, that i mark it as read. No title changes or something. In iOS4 the row gets updated and still leave on his current place, it does not move to the end of section. Thats the right way. in iOS5 the row gets also updated but it moves to the end of the Section. I want to prevent that. How can i do that? And why is that happening? See my code: - (NSFetchedResultsController *)fetchedResultsController { if (__fetchedResultsController != nil) { return __fetchedResultsController; } NSFetchRequest *fetchRequest = [[[NSFetchRequest alloc] init] autorelease]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"EntitySetsCardsInbox" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; NSPredicate *inboxPred = [NSPredicate predicateWithFormat:@"archived == 0 AND cardId != 0"]; [fetchRequest setPredicate:inboxPred]; if (sortString == nil) { //sortString = [[NSString alloc] initWithString:@"sortingOrder"]; sortString = [[NSString alloc] initWithString:@"colorOrder"]; sortAsc = NO; } if ([sortString isEqualToString:@"cardTitle"]) { NSSortDescriptor *sortDescriptor2 = [[[NSSortDescriptor alloc] initWithKey:sortString ascending:sortAsc selector:@selector(localizedCaseInsensitiveCompare:)] autorelease]; NSArray *sortDescriptors = [[[NSArray alloc] initWithObjects:sortDescriptor2, nil] autorelease]; [fetchRequest setSortDescriptors:sortDescriptors]; XLog(@"sortDescriptors: %@", sortDescriptors); } else { NSSortDescriptor *sortDescriptor2 = [[[NSSortDescriptor alloc] initWithKey:sortString ascending:sortAsc] autorelease]; NSArray *sortDescriptors = [[[NSArray alloc] initWithObjects:sortDescriptor2, nil] autorelease]; [fetchRequest setSortDescriptors:sortDescriptors]; XLog(@"sortDescriptors: %@", sortDescriptors); } NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:nil]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; [...] }
0
[ 2, 184, 20, 8402, 45, 483, 25, 2884, 18768, 5, 2172, 28998, 29955, 18, 12898, 1252, 6, 2058, 68, 12670, 19, 13, 7760, 264, 17, 13, 7760, 300, 800, 3726, 3726, 31, 57, 21, 859, 4725, 56, 25, 11111, 29, 13, 2172, 28998, 29955, 18,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
tracked files in untracked directory in github repository === When i cloned advimage repository, `img/` directory seems untracked. gokmen@rodosto advimage % git st ?? img/ gokmen@rodosto advimage % git status # On branch develop # Untracked files: # (use "git add <file>..." to include in what will be committed) # # img/ nothing added to commit but untracked files present (use "git add" to track) This directory is not empty, there's tracked file named **sample.gif** in `img/`. I try to add an empty file: gokmen@rodosto advimage % touch img/hede gokmen@rodosto advimage % git add img/hede gokmen@rodosto advimage % git st A img/hede ?? img/ gokmen@rodosto advimage % rm -rf img gokmen@rodosto advimage % git st AD img/hede D img/sample.gif gokmen@rodosto advimage % git reset Unstaged changes after reset: M img/sample.gif gokmen@rodosto advimage % git st D img/sample.gif gokmen@rodosto advimage % `git fsck --full` output is empty. why can't i remove `img/` in `git status` list?
0
[ 2, 15535, 6488, 19, 367, 4792, 69, 16755, 19, 13, 10404, 20926, 24869, 800, 3726, 3726, 76, 31, 13871, 43, 21, 17905, 22039, 24869, 15, 13, 1, 1660, 263, 118, 1, 16755, 2206, 367, 4792, 69, 9, 162, 197, 755, 1, 6526, 759, 262, 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...
MVC Controller/View removing model attribute === I'm creating a small MVC application and am passing a User object from a controller to an ActionResult method in another controller. One of the attributes of the User object is a list of Property objects called Properties. Here's the rub: when the User object is finally passed to the relevant View, it's list does not contain any properties. Here's the setup: **User class:** public class User { public int Id {get;set;} public List<Property> Properties {get;set;} } **AccountController** public ActionResult LogOn(int userId, string cryptedHash) { //code to logOn (this works, promise) User user = dbContext.getUser(userId); //debugging shows the user contains the list of properties at this point return RedirectToAction("UserHome", "Home", user); } **HomeController** public ActionResult UserHome(User user) { ViewBag.Messaage = "Hello, " + user.Forename + "!"; return View(user); //debugging shows that user.Properties is now empty(!) } **UserHome.cshtml View** @model emAPI.Model_Objects.User @{ ViewBag.Title = "UserHome"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h2>UserHome</h2> <div> @Model.Forename, these are your properties: <ul> @foreach (var property in @Model.Properties) { <li>property.Name</li> } </ul> </div> The view loads without any problem - `@Model.Forename` is fine, but as far as `HomeController` is concerned `user.Properties` was empty when it received it, although I know it wasn't when `AccountController` sent it. Any help or advice anyone has to offer would be gratefully received. Thanks, David
0
[ 2, 307, 8990, 9919, 118, 4725, 9096, 1061, 35, 14755, 800, 3726, 3726, 31, 22, 79, 2936, 21, 284, 307, 8990, 3010, 17, 589, 2848, 21, 4155, 3095, 37, 21, 9919, 20, 40, 1028, 29955, 2109, 19, 226, 9919, 9, 53, 16, 14, 13422, 16, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Drag and drop sorting of cursor adapter and list adapter === I'm very suprised there is such a small amount of info on drag and drop sorting with a cursor adapter and list adapter. The closest post I have found on stackoverflow is this one: http://stackoverflow.com/a/5047618/317889 But, it's not clear to me how to implement what CommonsWare suggests - clarification would be very helpful. So far I am binding the cursor data to a list adapter and setting this as follows: mMyCursorAdapter = new MyCursorAdapter(getActivity(), null); setListAdapter(mMyCursorAdapter); getLoaderManager().initLoader(0, null, this); The list is generated but I now wish to add drag and drop functionality to the list items. I would like to know the best way to go about this from an architectual point of view and any pointers as to how to go about the development of the core functionalty would also be useful. Thank you very much for any guidance.
0
[ 2, 5501, 17, 2804, 2058, 68, 16, 29588, 9924, 106, 17, 968, 9924, 106, 800, 3726, 3726, 31, 22, 79, 253, 11128, 2777, 69, 80, 25, 145, 21, 284, 2006, 16, 15404, 27, 5501, 17, 2804, 2058, 68, 29, 21, 29588, 9924, 106, 17, 968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Start new CAAnimation from current CAAnimation's state === I'm using a pair of CALayers as image masks, allowing me to animate a bulb filling or emptying at a set speed while also following the current touch position. That is, one mask jumps to follow the touch and the other slides to that position. Since I use an explicit animation I'm forced to set the position of the mask sliding mask when I add the animation. This means that if I start a fill and then start an empty before the fill completes the empty will begin from the completed fill position (the opposite is also true). Is there a way to get the position of the animation, set the position at each step of the animation, or to have the new animation begin from the current state of the active animation? The code handling the animating is below: - (void)masksFillTo:(CGFloat)height { // Clamp the height we fill to inside the bulb. Remember Y gets bigger going down. height = MIN(MAX(BULB_TOP, height), BULB_BOTTOM); // We can find the target Y location by subtracting the Y value for the top of the // bulb from the height. CGFloat targetY = height - BULB_TOP; // Find the bottom of the transparent mask to determine where the solid fill // is sitting. Then find how far that fill needs to move. // TODO: This works with the new set position, so overriding old anime doesn't work CGFloat bottom = transMask.frame.origin.y + transMask.frame.size.height; // If the target is above the bottom of the solid, we want to fill up. // This means the empty mask jumps and the transparent mask slides. CALayer *jumper; CALayer *slider; if (bottom - targetY >= 0) { jumper = emptyMask; slider = transMask; // We need to reset the bottom to the emptyMask bottom = emptyMask.frame.origin.y + emptyMask.frame.size.height; } else { jumper = transMask; slider = emptyMask; } [jumper removeAllAnimations]; [slider removeAllAnimations]; CGFloat dy = bottom - targetY; [CATransaction begin]; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; [jumper setPosition:CGPointMake(jumper.position.x, jumper.position.y - dy)]; [self slideMaskFillTo:height withMask:slider]; // Do this inside here or an odd flash glitch appears. [CATransaction commit]; } // TODO: Always starts from new position, even if animation hasn't reached it. - (void)slideMaskFillTo:(CGFloat)height withMask:(CALayer *)slider { // We can find the target Y location by subtracting the Y value for the top of the // bulb from the height. CGFloat targetY = height - BULB_TOP; // We then find the bottom of the mask. CGFloat bottom = slider.frame.origin.y + slider.frame.size.height; CGFloat dy = bottom - targetY; // Do the animation. Animating with duration doesn't appear to work properly. // Apparently "When modifying layer properties from threads that don’t have a runloop, // you must use explicit transactions." CABasicAnimation *a = [CABasicAnimation animationWithKeyPath:@"position"]; a.duration = (dy > 0 ? dy : -dy) / PXL_PER_SEC; // Should be 2 seconds for a full fill a.fromValue = [NSValue valueWithCGPoint:slider.position]; CGPoint newPosition = slider.position; newPosition.y -= dy; a.toValue = [NSValue valueWithCGPoint:newPosition]; a.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; [slider addAnimation:a forKey:@"colorize"]; // Update the actual position slider.position = newPosition; } And an example of how this is called. Notice this means it can be called mid-animation. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self.view]; [self masksFillTo:point.y]; } If anyone finds it relevant, this is the creation of the images and masks. // Instantiate the different bulb images - empty, transparent yellow, and solid yellow. This // includes setting the frame sizes. This approach found at http://stackoverflow.com/a/11218097/264775 emptyBulb = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Light.png"]]; transBulb = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Light-moving.png"]]; solidBulb = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Light-on.png"]]; [emptyBulb setFrame:CGRectMake(10, BULB_TOP, 300, BULB_HEIGHT)]; // 298 x 280 [transBulb setFrame:CGRectMake(10, BULB_TOP, 300, BULB_HEIGHT)]; // 298 x 280 [solidBulb setFrame:CGRectMake(10, BULB_TOP, 300, BULB_HEIGHT)]; // 298 x 280 [self.view addSubview:solidBulb]; // Empty on top, then trans, then solid. [self.view addSubview:transBulb]; [self.view addSubview:emptyBulb]; // Create a mask for the empty layer so it will cover the other layers. emptyMask = [CALayer layer]; [emptyMask setContentsScale:emptyBulb.layer.contentsScale]; // handle retina scaling [emptyMask setFrame:emptyBulb.layer.bounds]; [emptyMask setBackgroundColor:[UIColor blackColor].CGColor]; emptyBulb.layer.mask = emptyMask; // Also create a mask for the transparent image. transMask = [CALayer layer]; [transMask setContentsScale:transBulb.layer.contentsScale]; // handle retina scaling [transMask setFrame:transBulb.layer.bounds]; [transMask setBackgroundColor:[UIColor blackColor].CGColor]; transBulb.layer.mask = transMask;
0
[ 2, 799, 78, 1658, 3443, 79, 857, 37, 866, 1658, 3443, 79, 857, 22, 18, 146, 800, 3726, 3726, 31, 22, 79, 568, 21, 2146, 16, 1658, 15187, 18, 28, 1961, 18992, 15, 2719, 55, 20, 14487, 591, 21, 11866, 7702, 54, 2424, 68, 35, 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...
Sql Server 2008 Reporting Fill Blanks with 0's === Hi I have a table that has many blank values in it. I would like to set these to show up as 0 . Is there a way I can do this? Preferably outside of the query, and within reporting services.
0
[ 2, 4444, 255, 8128, 570, 6670, 3509, 6463, 18, 29, 713, 22, 18, 800, 3726, 3726, 4148, 31, 57, 21, 859, 30, 63, 151, 6463, 4070, 19, 32, 9, 31, 83, 101, 20, 309, 158, 20, 298, 71, 28, 713, 13, 9, 25, 80, 21, 161, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
Layout for Composite that allows component resizing === I was using GridLayout, but to automatically resizes components. For example, when text is added into a swt.widgets.Text component, a resize occurs. I do not want this automatic resizing. GridBagLayout can't be used with a Composite. How can I get a good layout without the components resizing.
0
[ 2, 9106, 26, 12639, 30, 2965, 5912, 10719, 3335, 800, 3726, 3726, 31, 23, 568, 7354, 4414, 1320, 15, 47, 20, 7499, 10719, 13569, 5090, 9, 26, 823, 15, 76, 1854, 25, 905, 77, 21, 8783, 38, 9, 3976, 43, 3060, 18, 9, 11969, 5912, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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...
DAO and Service layer design === I am developing web application with Java EE 6. In order to minimize calls to database will it be a good idea to have classes: Data access class (DAO) will call only basic methods `getAllClients, getAllProducts, getAllOrders, delete, update` methods - CRUD methods. Service class which will call CRUD methods but in addition filter methods e.g. `findClientByName, findProuctByType, findProductByYear, findOrderFullyPaid/NotPaid` etc... which will be based on basic DAO methods. Thank you
0
[ 2, 13, 17104, 17, 365, 5385, 704, 800, 3726, 3726, 31, 589, 3561, 2741, 3010, 29, 8247, 13, 2851, 400, 9, 19, 389, 20, 16713, 3029, 20, 6018, 129, 32, 44, 21, 254, 882, 20, 57, 2684, 45, 1054, 1381, 718, 13, 5, 17104, 6, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Call methods by string === I've following class. list= ["function1", "function2", "function3"] class doit(object): def __init__(self): for item in list: if item == "function1": self.function1() elif item == "function2": self.function2() elif item == "function2": self.function2() def function1(self): #do this pass def function1(self): #do that pass If an instance of this class is created, it iterates over a list with strings and calls methods depending on the actual string. The strings in the list have the equal names like the corresponding methods. How can I do this in a more elegant way? I don't want to add another `elif`-path for every "function" I add to the list.
0
[ 2, 645, 3195, 34, 3724, 800, 3726, 3726, 31, 22, 195, 249, 718, 9, 968, 3726, 636, 7, 22359, 165, 7, 15, 13, 7, 22359, 135, 7, 15, 13, 7, 22359, 240, 7, 500, 718, 107, 242, 5, 23793, 6, 45, 6312, 13, 1, 108, 242, 1, 5, 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...