unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Storing records in batches of 12 sql === Is it possible to store data in sets or batches of 12 in sql? I have a query which before inserting a new row should check if the existing records are equal or less than twelve. If they are twelve then it should create a new batch which also stores a maximum of twelve records.
0
[ 2, 25615, 742, 19, 13064, 160, 16, 390, 4444, 255, 800, 3726, 3726, 25, 32, 938, 20, 1718, 1054, 19, 3415, 54, 13064, 160, 16, 390, 19, 4444, 255, 60, 31, 57, 21, 25597, 56, 115, 14692, 68, 21, 78, 3131, 378, 2631, 100, 14, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to map mysql table to Grails domain class? === I have mysql table named `anto2`. Which has only one column `name` of `varchar 100`. I tried to map this table in grails domain class : class Anto { String grailsName static constraints = { } static mapping = { table 'anto2' grailsName column: 'name' } } After I did `run-app` I can see my table have been added with two more columns : +---------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | name | varchar(100) | YES | | NULL | | | id | bigint(20) | NO | | NULL | | | version | bigint(20) | NO | | NULL | | +---------+--------------+------+-----+---------+-------+ I generated static view and controller for this Domain class and when I tried to save it , I get an error in my `save()` method (which is generated using `generate-all` command). The error is as follows : 2012-07-09 23:05:26,391 [http-bio-8080-exec-2] ERROR errors.GrailsExceptionResolver - SQLException occurred when processing request: [POST] /mysql/anto/save - parameters: create: Create Field 'id' doesn't have a default value. Stacktrace follows: Message: Field 'id' doesn't have a default value Line | Method ->> 1073 | createSQLException in com.mysql.jdbc.SQLError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 3597 | checkErrorPacket in com.mysql.jdbc.MysqlIO | 3529 | checkErrorPacket . in '' | 1990 | sendCommand in '' | 2151 | sqlQueryDirect . . in '' | 2625 | execSQL in com.mysql.jdbc.ConnectionImpl | 2119 | executeInternal . in com.mysql.jdbc.PreparedStatement | 2415 | executeUpdate in '' | 2333 | executeUpdate . . in '' | 2318 | executeUpdate in '' | 105 | executeUpdate . . in org.apache.commons.dbcp.DelegatingPreparedStatement | 25 | save in mnm.AntoController | 1110 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 722 | run . . . . . . . in java.lang.Thread Why does this happen? Where I went wrong?
0
[ 2, 184, 20, 2942, 51, 18, 22402, 859, 20, 489, 7301, 18, 4603, 718, 60, 800, 3726, 3726, 31, 57, 51, 18, 22402, 859, 377, 13, 1, 210, 262, 135, 1, 9, 56, 63, 104, 53, 4698, 13, 1, 7259, 1, 16, 13, 1, 3311, 5433, 808, 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...
Selecting List Element (capturing down/up arrow) === I have following HTML structure ('ul li' are rendered as drop-down/select) <input id="input_city" type="text" /> <div class="suggestions"> <ul> <li value="0" name="New York">New York</li> <li value="1" name="London">London</li> <li value="2" name="Paris">Paris</li> <li value="3" name="Sydney">Sydney</li> </ul> </div> Need JavaScript/jQuery code to capture down arrow key press event (on input) which will select first 'li' element Consecutive down key select next 'li' elements; and up key select previous 'li' elements.
1
[ 2, 20764, 968, 4520, 13, 5, 4666, 2517, 68, 125, 118, 576, 7409, 6, 800, 3726, 3726, 31, 57, 249, 13, 15895, 1411, 13, 5, 22, 1287, 2093, 22, 50, 10877, 28, 2804, 8, 2968, 118, 18, 16964, 6, 13, 1, 108, 4881, 4924, 3726, 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...
REST help page and REST Test client in MVC4 WebApi === I developed several REST services using an early version of webapi (0.6.0), and for My services I enabled help page and Test client in as below in RegisterRoutes (called from application_start: routes.Add(new ServiceRoute("auth", new HttpServiceHostFactory() { Configuration = new HttpConfiguration() { EnableTestClient = true, EnableHelpPage = true } }, typeof(Auth_Api))); So I was able to access service at http://<myserver>/auth and access help page and test client at http://<myserver>/auth/help http://<myserver>/auth/test Now I need to migrate them to MVC4 webapi, and I would like to accomplish the same behaviour, regarding test and help page, but I cannot find how to do it. In RegisterRoutes I have this code which setup routes for API (REST) functionality routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); Can I add System.ServiceModel.Activation and Microsoft.ApplicationServer.Http.Activation assemblies to MVC4 webapi app and set the routes as before? Any drawbacks if I do it this way (in case it works)? Thanks
0
[ 2, 760, 448, 2478, 17, 760, 1289, 6819, 19, 307, 8990, 300, 95, 969, 2159, 800, 3726, 3726, 31, 885, 238, 760, 687, 568, 40, 274, 615, 16, 95, 969, 2159, 13, 5, 387, 9, 379, 9, 387, 6, 15, 17, 26, 51, 687, 31, 9338, 448, 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...
Can't find Scripting Bridge header files: mail.h iCal.h after upgrading Xcode === This should be easy.. I recently upgraded to the newest version of Xcode on 10.7 from Xcode 3.6 I believe. I have been working with scripting bridge for both Apple Mail and iCal. Previously, I could use FILE > Open Quickly... to view either the mail.h or iCal.h header files as entering the file name revealed only one file... the correct one. Now, when I enter either mail.h or iCal.h using Open Quickly, dozens of files come up in the list, but NONE of them are the correct Scripting Bridge header files. Can anyone tell me where and/or how to view these header files again? It is driving me just a bit nuts here.. Thanks!
0
[ 2, 92, 22, 38, 477, 3884, 68, 955, 157, 106, 6488, 45, 4216, 9, 252, 13, 4272, 9, 252, 75, 26939, 993, 9375, 800, 3726, 3726, 48, 378, 44, 2010, 9, 9, 31, 1989, 9958, 20, 14, 17175, 615, 16, 993, 9375, 27, 332, 9, 465, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to receive return extend access token by javascript === After extend, I can: 1. See extend access token on browser: access_token=TOKEN&expires=EXPIRES 2. Error message "invalid assignment left-hand side" How can I get token from response. My Code: ---------- <script> window.onload = function() { FB.init({appId:422642254433770, cookie:true, status:true, xfbml:true }); FB.getLoginStatus(function(response) { var uid = response.authResponse.userID; var accessToken = response.authResponse.accessToken; var accessTokenOld = response.authResponse.accessToken; //Extend access token var OauthParams = {}; OauthParams['client_id'] = 'CLIEN ID'; OauthParams['client_secret'] = 'CLIENT SECRET'; OauthParams['grant_type'] = 'fb_exchange_token'; OauthParams['fb_exchange_token'] = accessToken; OauthParams['response_type'] = 'token'; FB.api('/oauth/access_token', 'post', OauthParams, function(extendResponse) { console.log("Extend token: " + extendResponse.accessToken); }); }); }; </script>
0
[ 2, 184, 20, 2588, 788, 7206, 1381, 20, 2853, 34, 8247, 8741, 800, 3726, 3726, 75, 7206, 15, 31, 92, 45, 137, 9, 196, 7206, 1381, 20, 2853, 27, 16495, 45, 1381, 1, 262, 2853, 3726, 262, 2853, 1569, 6899, 7735, 18, 3726, 6899, 773...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 does this error from Heroku mean and how can I fix it? === When I try to open an application I'm working on through heroku, I get an application error. I went into my heroku logs, and found the following error: "Error H10 (App crashed) -> GET gentle-samurai-8665.herokuapp.com/ dyno= queue= wait= service= status=503 bytes= 2012-07-09T17:39:09+00:00 heroku[router]: Error H10 (App crashed) -> GET gentle-samurai-8665.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=" I'm not sure what the error refers to or how I can go about fixing the problem that causes the error. Any help you can give would be great!
0
[ 2, 98, 630, 48, 7019, 37, 36, 9266, 884, 17, 184, 92, 31, 6098, 32, 60, 800, 3726, 3726, 76, 31, 1131, 20, 368, 40, 3010, 31, 22, 79, 638, 27, 120, 36, 9266, 15, 31, 164, 40, 3010, 7019, 9, 31, 296, 77, 51, 36, 9266, 18893...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Putting random latitude and longitude in google maps geolocation? === I have latitude and longitude of some cities and I want to input it the geocoder randomly. Can anyone please tell me how do I do that. The values are both negative and float. for an instance mexico lat/long 23.634501,-102.552784 myLatlng = new google.maps.LatLng(1.352083,103.819836); I want to put values randomly from a set of values in Latlng function. Thanks
0
[ 2, 3873, 5477, 16337, 17, 22291, 19, 8144, 6867, 6389, 19032, 60, 800, 3726, 3726, 31, 57, 16337, 17, 22291, 16, 109, 1920, 17, 31, 259, 20, 6367, 32, 14, 6389, 716, 1157, 21324, 9, 92, 1276, 2247, 494, 55, 184, 107, 31, 107, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Layout and View, what's the difference? As an example of Zend_Layout and Zend_View === I cannot understand what is the difference between `Zend_Layout` and `Zend_View`. Here is a picture from `Zend_Layout` Tutorial. ![enter image description here][1] Everything seems easy to understand. We have elements in `<head>`, we have `Header`, `Navigation` segment, `Content` segment, `Sidebar` and `Footer`. And it's easy to understand how they are called. But I can't see the difference between `View` and `Layout`. Why `Navigation` segment is called as `Layout`'s property and `Footer` and `Header` are called as `View` property? I tested `Zend_Layout` and interchanged them. I called the `Navigation` segment not as the `Layout`'s property but as the `View`'s property: echo $this->layout()->nav; // as in tutorial echo $this->nav; // used to call like this And everything works fine. Not only for `$nav`, but for any variable. So what's the difference? I attach my experiment code here. My experiment layout page consists of three main blocks: - header (html-code of header), - content (html-code of content block) - footer (html-код footer) Here's a script of template: <!DOCTYPE html> <html> <head> </head> <body> <div header> <?php echo $this->header ?> // it works <?php echo $this->layout()->header ?> // and this variant also works </div> <div content> <?php echo $this->content ?> // same thing, it is a View's property <?php echo $this->layout()->content ?> // And it is a Layout's property </div> <div footer> <?php echo $this->footer ?> // same thing <?php echo $this->layout->footer() ?> // both work (one or another I mean) </div> </body> </html> My code now: $layout = Zend_Layout::startMvc(); // instantiate Layout $layout->setLayoutPath('\TestPage\views'); // set the path where my layouts live // And here's the most interesting // Set Header layout first $layout->setLayout('header'); // 'header.php' - is my file with html-code of the Header // I pass only name 'header', and it makes 'header.php' from it. // Predefined suffix is 'phtml' but I changed it to 'php' $layout->getView()->button = "Button"; // assign some variable in the Header. Please pay attention, it is View's property $layout->button_2 = "Button_2"; // and also I can assign this way. It's Layout's property now. And they both work $headerBlock = $layout->render(); // render my Header and store it in variable // the same procedures for the Content block $layout->setLayout('content'); $layout->getView()->one = "One"; $layout->two = "Two"; $contentBlock = $layout->render(); // render and store in the variable // and the same for the Footer $layout->setLayout('footer'); $layout->getView()->foot = "Foot"; $layout->foot_2 = "Foot_2"; $footerBlock = $layout->render(); // render and store in the variable // and finally last stage - render whole layout and echo it $lout->setLayout('main_template'); $layout->getView()->header = $headerBlock; // again, I can do also $layout->header $lout->content = $contentBlock; $lout->getView()->footer = $footerBlock; echo $lout->render(); // render and echo now. And everything works fine, the page is displayed without errors. But I don't know whether I use `Zend_Layout` and `Zend_View` right way or wrong way. Is it the right way to construct the page using `Zend_Layout` as I do it? What's the difference between echo $this->layout()->header // this echo $this->header // and this Which variant is right one? Also it seems I have double rendering: at first I render each segment. And then I render them again when I render my final template. Is this the right way? [1]: http://i.stack.imgur.com/f27K4.png
0
[ 2, 9106, 17, 1418, 15, 98, 22, 18, 14, 2841, 60, 28, 40, 823, 16, 10526, 43, 1, 4414, 1320, 17, 10526, 43, 1, 4725, 800, 3726, 3726, 31, 1967, 1369, 98, 25, 14, 2841, 128, 13, 1, 4257, 43, 1, 4414, 1320, 1, 17, 13, 1, 4257...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Suddenly timeout when connecting via SSL/Https with some browsers === The https-version of my website suddenly is not reachable any more from Firefox or Chrome (chrome shows ERR_TIMED_OUT). Both browsers behave as if the site was down. With Internet Explorer is working all right. This happens on multiple computers since yesterday. I use a startcom.org signed certificate. Wireshark shows: TLSV1 Client Hello TLSV1 Server Hello Certificate Server Key Exchange, Server Hello Done Client Key Exchange, Change cipher spec, Encrypted Handshake Message Encrypted Handshake Message, Change cipher spec, Encrypted Handshake Message Encrypted Alert TCP RST, ACK A bit later there is a request from User-Agent: Microsoft-CryptoAPI/6.1 to crl.startssl.com/crt1-crl.crl Any help appreciated.
0
[ 2, 1605, 85, 1320, 76, 6440, 1197, 13, 18, 18, 255, 118, 21127, 18, 29, 109, 16495, 18, 800, 3726, 3726, 14, 7775, 18, 8, 10898, 16, 51, 2271, 1605, 25, 52, 1470, 579, 186, 91, 37, 535, 18219, 54, 13, 12985, 13, 5, 12985, 1285...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 screen.width and window.devicePixelRatio to detect mobile and/or retina displays is this a bad approach? === I'm developing a website for a business. It's not a web application by any stretch of the imagination but I would like it to look ok on mobile devices rather than simply scale the desktop version. After lots of research into media queries and responsive/adaptive design approaches my requirements are that the mobile layout only kicks in when the user really is on a small screen and not just resizing their desktop window, the solution is simple and can be accomplished with media queries and minimal javascript. The approach I've come up with is something like this: <script type="text/javascript"> var isRetina = window.devicePixelRatio > 1 ? true : false; var isMobile = (screen.width < 768) ? true : false; if (isMobile && isRetina) { SHOW MOBILE LAYOUT AND HI-RES IMAGES } else if (isMobile && !isRetina) { SHOW MOBILE LAYOUT AND LO-RES IMAGES } else if (!isMobile && isRetina) { <<SHOW HI_RES IMAGES>> } else if (!isMobile && !isRetina) { SHOW DESKTOP LAYOUT AND LO-RES IMAGES } </script> Before I commit to this approach I figured I'd check in and see if there is a problem or a terrible gotcha awaiting me. Or if there's an even simpler/better way to achieve this goal. I've searched a bunch on SO an haven't seen any mention of using this exact same solution.
0
[ 2, 568, 2324, 9, 3976, 43, 96, 17, 1463, 9, 546, 18507, 18321, 532, 17511, 111, 20, 9092, 3241, 17, 118, 248, 24325, 9412, 25, 48, 21, 896, 2141, 60, 800, 3726, 3726, 31, 22, 79, 3561, 21, 2271, 26, 21, 508, 9, 32, 22, 18, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Yii Active Record CExistValidator doesn't seem to do anything === I'm trying to use exist validation rule to ensure that my relation is met (i.e. event_id in table EventOther exists in table Event). I'm trying to use (EventOther.php) public function rules(){ return array( array('event_id','exists','allowEmpty'=>false, 'attributeName'=>'id','className'=>'Event', 'message'=>'Specified event does not exist. (event_id incosistent)') ); and the create new entry in the database (record with id 17 does not exist): $ev = new EventOther; $ev->event_id = 17; $ev->location_id = 1; $ev->location = "Test Location - hardcoded"; if(!$ev->save()) print_r($ev->getErrors()); which always results in CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`fiss`.`event_other`, CONSTRAINT `event_other_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`)). The SQL statement executed was: INSERT INTO `event_other` (`event_id`, `location_id`, `location`) VALUES (:yp0, :yp1, :yp2) Moreover, the validation still passes if `$ev->event_id` is not set, which due to `'allowEmpty'=>false` it should not. `Event::model()->exists("id=2");` (where record with id 2 exists) returns 1 while `Event::model()->exists("id=17");` returns empty. Did I misunderstand/misuse CExistValidator? All help is much appreciated.
0
[ 2, 7679, 49, 1348, 571, 272, 1706, 702, 18506, 43, 3457, 1437, 22, 38, 2260, 20, 107, 602, 800, 3726, 3726, 31, 22, 79, 749, 20, 275, 3182, 27999, 1828, 20, 4062, 30, 51, 5827, 25, 798, 13, 5, 49, 9, 62, 9, 807, 1, 1340, 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...
Is there any plugin like "Smooth Div Scroll" that scrolls content vertically up or down? === I need to create a vertical scrolling with only the up and down buttons. I've only found examples of scrolling with the entire scrollbar. Is there any plugin like "Smooth Div Scroll" (just the two buttons) that scrolls content vertically up or down? Thanx, Tiago
0
[ 2, 25, 80, 186, 10922, 108, 101, 13, 7, 18, 8765, 96, 13, 12916, 12159, 7, 30, 12159, 18, 2331, 23300, 71, 54, 125, 60, 800, 3726, 3726, 31, 376, 20, 1600, 21, 7035, 13, 28166, 29, 104, 14, 71, 17, 125, 12861, 9, 31, 22, 195...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 floating windows ( separated activities for multi-tasking ) === how to create floating activities for Android? seems not impossible as i find a workable sample on store: [https://play.google.com/store/apps/details?id=com.myboyfriendisageek.airbrowser][1] seems even Android 2.1+ already support this, any idea how to start? [1]: https://play.google.com/store/apps/details?id=com.myboyfriendisageek.airbrowser
0
[ 2, 13005, 8319, 1936, 13, 5, 4196, 1648, 26, 1889, 8, 6922, 1581, 13, 6, 800, 3726, 3726, 184, 20, 1600, 8319, 1648, 26, 13005, 60, 2206, 52, 3992, 28, 31, 477, 21, 170, 579, 5717, 27, 1718, 45, 636, 21127, 18, 6903, 5438, 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...
com.google.gdata.util.ServiceForbiddenException: Invalid domain === Hi i want to retrieve the list of all users of domain cloudspokestest.appspot.com.so i created a class. public class Hello { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { AppsForYourDomainClient client=new AppsForYourDomainClient("riteshmehandiratta@gmail.com","password","cloudspokestest.appspot.com"); client.retrieveAllUsers(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } but i am getting the following error can anyonne please help how to get rid of this error. 1 Jul, 2012 9:06:33 AM sample.appsforyourdomain.AppsForYourDomainClient retrieveAllUsers INFO: Retrieving all users. com.google.gdata.util.ServiceForbiddenException: Invalid domain. <HTML> <HEAD> <TITLE>Invalid domain.</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Invalid domain.</H1> <H2>Error 403</H2> </BODY> </HTML> at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:605) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536) at com.google.gdata.client.Service.getFeed(Service.java:1135) at com.google.gdata.client.Service.getFeed(Service.java:998) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645) at com.google.gdata.client.Service.getFeed(Service.java:1017) at com.google.gdata.client.appsforyourdomain.AppsForYourDomainService.getFeed(AppsForYourDomainService.java:137) at sample.appsforyourdomain.AppsForYourDomainClient.retrieveAllUsers(AppsForYourDomainClient.java:499) at Hello.main(Hello.java:21) i am using provisioning api.so i have to enable them may be because of this i am getting this error i read https://developers.google.com/google-apps/provisioning/ but in this document they tell How to enable them in google apps not in google app engine. To enable the Provisioning API for a Next generation control panel Log in to your admin account and select Domain settings. Select the User settings tab. Select the checkbox enabling the Provisioning API, and save your changes. when i login there is my applicaion cloudsppokestest when i click on this there is one application setting option but no domain setting option.please help how to remove this error and riteshmehandiratta@gmail.com is the administrator.
0
[ 2, 13, 960, 9, 16111, 4875, 9, 263, 18768, 9, 14255, 9, 11449, 1106, 11283, 817, 10066, 872, 45, 16671, 4603, 800, 3726, 3726, 4148, 31, 259, 20, 11917, 14, 968, 16, 65, 3878, 16, 4603, 7742, 18722, 1430, 1430, 9, 7753, 18, 4296, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
bash getopts with multiple and mandatory options === Is it possible to use getopts to process multiple options together? For example, myscript -iR or myscript -irv. Also, I have a situation where based on a condition script would need mandatory option. For example, if argument to script is a directory, I will need to specify -R or -r option along with any other options (myscript -iR mydir or myscript -ir mydir or myscript -i -r mydir or myscript -i -R mydir), in case of file only -i is sufficient (myscript -i myfile). I tried to search but didn't get any answers. Thanks in advance for your suggestions.
0
[ 2, 13158, 164, 111, 13531, 29, 1886, 17, 12605, 6368, 800, 3726, 3726, 25, 32, 938, 20, 275, 164, 111, 13531, 20, 953, 1886, 6368, 429, 60, 26, 823, 15, 51, 8741, 13, 8, 1523, 54, 51, 8741, 13, 8, 49, 10359, 9, 67, 15, 31, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How dangerous is a compact anti-pattern, DetachedCriteria based, DAO utilitary for hibernate? === Long time ago I created an one-class-hibernate-util to ease my life on **really really small applications** using DetachedCriteria, as follows: import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.hibernate.criterion.DetachedCriteria; /* WARNING: This utility was projected only for applications of one operation per use per mapping! Using it for multiple operations characterizes the anti-pattern "session-by-operation". */ public class HibernateUtil { private static final int SEARCH = 0; private static final int LIST = 1; private static final int SAVE = 2; private static final int UPDATE = 3; private static final int SAVE_OR_UPDATE = 4; private static final int DELETE = 5; private static SessionFactory SESSION_FACTORY; // Single instantiation of the session factory static {SESSION_FACTORY = new Configuration().configure().buildSessionFactory();} // Opens the session and executes only one operation on the transaction private static Object executeTransaction(Object object, int operation) { Session session = SESSION_FACTORY.openSession(); Transaction transaction = null; try { transaction = session.beginTransaction(); switch (operation) { case SEARCH: object = ((DetachedCriteria) object).getExecutableCriteria(session).uniqueResult(); break; case LIST: object = ((DetachedCriteria) object).getExecutableCriteria(session).list(); break; case SAVE: session.save(object); break; case UPDATE: session.update(object); break; case SAVE_OR_UPDATE: session.saveOrUpdate(object); break; case DELETE: session.delete(object); break; default: throw new HibernateException("No operation was executed on the database."); } transaction.commit(); } catch (HibernateException exception) { if (transaction != null && transaction.isActive()) transaction.rollback(); throw new HibernateException(exception); } return object; } // Usable methods, named accordingly to the operation: public static Object searchCriteria(DetachedCriteria criteria) {return executeTransaction(criteria, SEARCH);} public static List<?> listCriteria(DetachedCriteria criteria) {return (List<?>) executeTransaction(criteria, LIST);} public static void save(Object object) {executeTransaction(object, SAVE);} public static void update(Object object) {executeTransaction(object, UPDATE);} public static void saveOrUpdate(Object object) {executeTransaction(object, SAVE_OR_UPDATE);} public static void delete(Object object) {executeTransaction(object, DELETE);} } (The session isn't closed to avoid problems with lazy initialization.) This allows me to interact with the database by calling `HibernateUtil.searchCriteria()/listCriteria()/save()/update()/saveOrUpdate()/delete()`, but I actually use it on very rare situations (tiny applications) due to its *session-by-operation* nature. The problem is, I just found out that my fellow co-workers've been using it in bigger applications, running over the use of proper DAO patterns. My fault. I'm worried about possible side-effects, like an overhead or overload, but I don't know exactly what problems I should worry about. Is this risky enough for me to start remaking the DAO in their applications? Can some of you more experienced programmer or DBA guys share me some light, here? I'd appreciate very much.
0
[ 2, 184, 3342, 25, 21, 8285, 1082, 8, 5972, 8766, 15, 14631, 16063, 9605, 432, 15, 13, 17104, 13, 14255, 242, 1857, 26, 4148, 2102, 8820, 60, 800, 3726, 3726, 175, 85, 1464, 31, 679, 40, 53, 8, 1898, 8, 8630, 106, 8820, 8, 14255,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 more pythonic to close a function with return or through indentation? === If I have a function that does not need to return a variable, is it considered better coding practice to close the function like this: def foo: #Code return #More code or like this? def bar: #Code #More code
0
[ 2, 25, 32, 91, 20059, 596, 20, 543, 21, 1990, 29, 788, 54, 120, 19, 817, 8593, 60, 800, 3726, 3726, 100, 31, 57, 21, 1990, 30, 630, 52, 376, 20, 788, 21, 7612, 15, 25, 32, 724, 574, 13, 15458, 1345, 20, 543, 14, 1990, 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...
What is happening in netstat's main.c Mac OS X, it appears to be initializing a struct nlist - but is it valid to specify it as an array? === What is happening in netstat's [main.c](http://www.opensource.apple.com/source/network_cmds/network_cmds-325/netstat.tproj/main.c) on Mac OS X, it appears to be initializing a struct nlist - but is using a strange syntax - is it valid to specify it as an array? Also is what happens when it is declared this way, the nlist struct doesn't have this many members.
0
[ 2, 98, 25, 4942, 19, 4275, 10631, 22, 18, 407, 9, 150, 1572, 13, 759, 993, 15, 32, 1780, 20, 44, 2104, 3335, 21, 13, 10346, 13, 103, 5739, 13, 8, 47, 25, 32, 7394, 20, 19077, 32, 28, 40, 7718, 60, 800, 3726, 3726, 98, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to get x1,y1,x2,y2 from map coords with javascript? === I have an image map and i want to have the x1,y1,x2,y2 separate in different variables, this is the map: <area shape="rect" coords="470,555,863,665" id="map" href="#" this is how to get the coords out of it: var myVar = (document.getElementById("map").coords); but the output of this line is "470,555,863,665" is it possible to separate them into different variables? thanks
0
[ 2, 184, 20, 164, 993, 165, 15, 93, 165, 15, 396, 135, 15, 93, 135, 37, 2942, 10378, 897, 18, 29, 8247, 8741, 60, 800, 3726, 3726, 31, 57, 40, 1961, 2942, 17, 31, 259, 20, 57, 14, 993, 165, 15, 93, 165, 15, 396, 135, 15, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Horizontal black lines appearing on background images === Horizontal black lines appearing on background images. This issue observed randomly on Samsung sky rocket device. ![this is a background image used for TabActivity ][1] [1]: http://i.stack.imgur.com/9CYze.png Till now there was no issue with images but suddenly it start appearing randomly on Sky rocket.
0
[ 2, 10095, 319, 1560, 4870, 27, 2395, 3502, 800, 3726, 3726, 10095, 319, 1560, 4870, 27, 2395, 3502, 9, 48, 1513, 3634, 21324, 27, 22981, 1661, 6598, 3646, 9, 13, 187, 2558, 1565, 25, 21, 2395, 1961, 147, 26, 6523, 19348, 13, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Qestion RUBY REGEX === Hello every one i have a html code as code bellow. I want to get the text inside <a>(.*)</a> i want to get this result data 1 : hello1 data 2 : hello2 data 3 : hello3 --------------------HTML CODE------------------------------ <a> hello1 </a> <a> hello2 </a> <a> hello3 </a> ------------------------END--------------------------------
0
[ 2, 2593, 160, 3309, 10811, 7953, 1706, 800, 3726, 3726, 10975, 352, 53, 31, 57, 21, 13, 15895, 1797, 28, 1797, 23040, 9, 31, 259, 20, 164, 14, 1854, 572, 13, 1, 58, 1, 5, 9, 2483, 6, 1, 118, 58, 1, 31, 259, 20, 164, 48, 82...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Linking OpenCV 2.4.2 with Visual Studio 2010 === I have installed OpenCV as described here: http://stackoverflow.com/questions/11527227/installing-opencv-2-4-for-c-c-for-visual-studio. I try to link openCV libraries and I am stuck at "the local method" in [this tutorial](http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html). I have two places with openCV files: [username]/opencv (official)/ where I extracted openCV source (referred further as source directory) [username]/opencv-build/ where I built openCV using cmake and then compiled it with Visual Studio (referred further as build directory) The tutorial I try to follow says to link $(OPENCV_DIR)\include which refers to build directory. However, "include" folder in my build directory contains only some cmake files, while "include" in the source directory contains openCV headers (in folders opencv and opencv). I understand that I should rather use the source directory instead, but I tried with both and none of them works. Next, the tutorial says to link $(OPENCV_DIR)\libs. I have a folder "lib" so I guess it is just a spelling error. My folder "lib" contains two folders: "Debug" and "Release". Should I add [username]/opencv-build/lib/Debug to Debug Property Page and [username]/opencv-build/lib/Release to Release Property Page? I have added 242 version libraries to Linker input in both Property Pages. Whatever I did, Visual Studio highlights all of the include statements and hence, everything else. #include "stdafx.h" #include <cv.h> #include <cxcore.h> #include <highgui.h> Any ideas what I am doing wrong?
0
[ 2, 12585, 368, 12732, 172, 9, 300, 9, 135, 29, 3458, 1120, 498, 800, 3726, 3726, 31, 57, 4066, 368, 12732, 28, 745, 235, 45, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 19275, 2567, 21811, 118, 108, 21300, 68, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is boost supportable with metro style app? === I have a desktop application which use boost library **1.49**(that was built on **msvc : 11**).I want to port my desktop app to metro style.Can i use this boost library with my Metro App. Specifically my question is that if boost uses any API that is restricted for **WinRT**?
0
[ 2, 25, 10419, 555, 579, 29, 3986, 1034, 4865, 60, 800, 3726, 3726, 31, 57, 21, 17404, 3010, 56, 275, 10419, 1248, 13, 1409, 165, 9, 3624, 1409, 5, 887, 23, 392, 27, 13, 1409, 79, 18, 8990, 13, 45, 547, 1409, 6, 9, 49, 259, 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...
How to show the second table for inserting answers of the questions that have been inserted in the first table? === I am trying to develop two dynamic tables where the user can add a new row directly in the first table, when he finished adding it, he will be able to select it to open the second table underneath the first table. I have a probelm now in selecting on the rows in the first table in order to show the second table. So how to get it? FYI, I have the following database design: Quiz Table: QuizID, Title, Description Question Table: QuestionID, Question, QuestionOrder, AnswerExplanation QuestionImage Table: ID, QuestionID, URL Answer Table: AnswerID, Answer QuizContent Table: ID, QuizID, QuestionID, AnswerID In addition, the first table will be for inserting the questions and the second table will be for inserting the answers. So how I can select a question to show the second table and being able to insert the answers for that question ASP.NET Code: <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"> <ContentTemplate> <asp:Table ID="questionsList" runat="server" Width="70%" CellPadding="0" CellSpacing="0" style="border:2px solid #003366; font-size:17px; font-weight:bold;"> <asp:TableHeaderRow> <asp:TableHeaderCell>ID</asp:TableHeaderCell> <asp:TableHeaderCell>Question</asp:TableHeaderCell> <asp:TableHeaderCell>Question Order</asp:TableHeaderCell> <asp:TableHeaderCell>Answer Explanation</asp:TableHeaderCell> </asp:TableHeaderRow> </asp:Table> <asp:Table ID="Table1" runat="server" Width="70%" CellPadding="5" CellSpacing="0" style="border:2px solid #003366;"> <asp:TableFooterRow> <asp:TableCell>Add</asp:TableCell> <asp:TableCell > <asp:TextBox ID="txtQuestion" runat="server"></asp:TextBox> <%--For the txtQuestion TextBox Control--%> <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txtQuestion" WatermarkText="Type the Question here" WatermarkCssClass="watermarked"> </ajaxToolkit:TextBoxWatermarkExtender> </asp:TableCell> <asp:TableCell> <asp:TextBox ID="txtQuestionOrder" runat="server"></asp:TextBox> <%--For the txtQuestionOrder TextBox Control--%> <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="txtQuestionOrder" WatermarkText="Type the Question Order here" WatermarkCssClass="watermarked"> </ajaxToolkit:TextBoxWatermarkExtender> </asp:TableCell> <asp:TableCell> <asp:TextBox ID="txtAnswerExplanation" runat="server"></asp:TextBox> <%--For the txtAnswerExplanation TextBox Control--%> <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server" TargetControlID="txtAnswerExplanation" WatermarkText="Type the Answer Explanation here" WatermarkCssClass="watermarked"> </ajaxToolkit:TextBoxWatermarkExtender> </asp:TableCell> <asp:TableCell> <span style="margin:3px 10px 0px 0px;"> <asp:ImageButton ID="addButton" runat="server" ImageUrl="Images/tick_small.png" OnClick="addQuestion" /> </span> </asp:TableCell> </asp:TableFooterRow> </asp:Table> </ContentTemplate> </asp:UpdatePanel> Code-Behind: public void fill_Questions() { string connString = ConfigurationManager.ConnectionStrings["QuizSysDBConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connString); string selectQuery = "SELECT * FROM Question"; SqlCommand cmd = new SqlCommand(selectQuery, conn); DataSet ds = new DataSet(); SqlDataAdapter sda = new SqlDataAdapter(); sda.SelectCommand = cmd; Table table = (Table)UpdatePanel1.FindControl("questionsList"); try { table.Rows.Clear(); //open the connection conn.Open(); //filling the dataset with the data sda.Fill(ds); //close the connection conn.Close(); } catch { table.Rows.Clear(); } //Loading the data into the table if (ds.Tables.Count > 0) { int rowsNum = ds.Tables[0].Rows.Count; for (int i = 0; i < rowsNum; i++) { TableRow row = new TableRow(); table.Rows.Add(row); for (int colCount = 0; colCount < 5; colCount++) { TableCell cell = new TableCell(); row.Cells.Add(cell); if (colCount == 0) { //int n = i + 1; cell.Controls.Add(new LiteralControl(ds.Tables[0].Rows[i]["QuestionID"].ToString())); } else if (colCount == 1) { cell.Controls.Add(new LiteralControl(ds.Tables[0].Rows[i]["Question"].ToString())); } else if (colCount == 2) { cell.Controls.Add(new LiteralControl(ds.Tables[0].Rows[i]["QuestionOrder"].ToString())); } else if (colCount == 3) { cell.Controls.Add(new LiteralControl(ds.Tables[0].Rows[i]["AnswerExplanation"].ToString())); } else if (colCount == 4) { ImageButton deleteButton = new ImageButton(); deleteButton.ImageUrl = "Images/DeleteRed.png"; deleteButton.ID = ds.Tables[0].Rows[i]["QuestionID"].ToString() + "_" + i; deleteButton.Click += new ImageClickEventHandler(deleteQuestion); cell.Controls.Add(deleteButton); } } //End for loop }//End OUTER for loop }//End if statement } //For deleting question public void deleteQuestion(object sender, EventArgs e) { string id = ((ImageButton)sender).ID.ToString().Split('_')[0]; try { string connString = ConfigurationManager.ConnectionStrings["QuizSysDBConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connString); string deleteQuery = "DELETE FROM Question WHERE QuestionID = @id"; SqlCommand cmd = new SqlCommand(deleteQuery,conn); cmd.Parameters.AddWithValue("@id", id); conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); fill_Questions(); } catch(SqlException se){} UpdatePanel1.Update(); } //For adding questions public void addQuestion(object sender, EventArgs e) { try { TextBox txtQuestion = (TextBox)UpdatePanel1.FindControl("txtQuestion"); TextBox txtQuestionOrder = (TextBox)UpdatePanel1.FindControl("txtQuestionOrder"); TextBox txtAnswerExplanation = (TextBox)UpdatePanel1.FindControl("txtAnswerExplanation"); string connString = ConfigurationManager.ConnectionStrings["QuizSysDBConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connString); string insertQuery = "INSERT INTO Question (Question, QuestionOrder, AnswerExplanation) VALUES (@Question, @QuestionOrder, @AnswerExplanation)"; SqlCommand cmd = new SqlCommand(insertQuery,conn); cmd.Parameters.AddWithValue("@Question", txtQuestion.Text); cmd.Parameters.AddWithValue("@QuestionOrder", txtQuestionOrder.Text); cmd.Parameters.AddWithValue("@AnswerExplanation", txtAnswerExplanation.Text); conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); fill_Questions(); } catch(SqlException se){} }
0
[ 2, 184, 20, 298, 14, 153, 859, 26, 14692, 68, 6709, 16, 14, 2346, 30, 57, 74, 14215, 19, 14, 64, 859, 60, 800, 3726, 3726, 31, 589, 749, 20, 2803, 81, 7782, 7484, 113, 14, 4155, 92, 3547, 21, 78, 3131, 1703, 19, 14, 64, 859,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Likes on page using xfbml scrape all but og:image === I've done my research on this and coded and recoded (plus used the code generator on FB) my page to try to achieve the following - I have a page of computer segments (Multimedia, Gaming etc) for a store that each have a Share section attached (FB, Twitter, Google+ etc) so that the user can say Like this segment and have it displayed on their timeline. The standard way for creating a Like button is one button per page so that all the meta data can go to the top; but in this instance there is multiple buttons. I found a technique using xfbml where the meta tags are stored on another html file - <div class="fb-like" data-href="http://www.domain.com/assets/facebook/gaming.html" data-send="false" data-layout="button_count" data-width="200" data-show-faces="true" data-action="recommend" data-font="segoe ui"></div> And this page contains - <meta property="og:title" content="[Segment name] at [retailer website]. "/> <meta property="og:url" content="[url back to segment page]"/> <meta property="og:image" content="http://www.domain.co.uk/build/assets/images/gif/facebookBaseLogo.gif"/> <meta property="og:description" content="I am looking for a [computer specs] [at retailer website]."/> <meta property="og:site_name" content="[retailer name]"/> <meta property="og:type" content="website"/> <meta property="fb:admins" content="[my admin number]"/> The technique works in that everything is pulled by FB into the timeline except the image - replaced by a 1x1pixel gif. I would understand if the entire technique failed, but it's just the image, so I checked with the debugger. The debugger reports: Like Button Warnings That Should Be Fixed >Admins And App ID Missing >fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high clickthrough rate. >Like Button Tag Missing og:title is missing. The og:title meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate. >Like Button Tag Missing og:type is missing. The og:type meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate. >Like Button Tag Missing og:image is missing. The og:image meta tag is necessary for Facebook to render a News Feed story that generates a high clickthrough rate. >Open Graph Warnings That Should Be Fixed >Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags. >Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags. >Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags. >Tiny og:image All the images referenced by og:image must be at least 200px in both dimensions. Please check all the images with tag og:image in the given url and ensure that it meets the minimum specification. So it is saying all the og data is missing - which is technically correct on THIS page, but it does manage to get the data from the supplied data-href and put it on FB except the image. I've read a lot about caching on FB being a royal pain, so I have checked and rechecked my image links and run through the debugger to get rescraped. Nothing. I'm not even convinced it is rescraped as quickly as people have said using Debugger as the link in the code (using Firebug) on the Timeline page doesn't seem to change as often I change the code. Then I saw the 200x200px - ah, the image isn't. So I set to 210x210px just in case. Again through the debugger. Nothing. More research - the image is not behind https; I've tried storing it in same folder as html files with og tags, in assets/images/gif, resizing and saving as png or gif. I actually found a perfect solution, which was the sharer.php method - this looks like it would have suited me to the ground - using this example http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fshar.es%2FtxqZ9&t=One+Time+Facebook+Pop+Up+Like+Box+For+Blogger+%7C+Spice+Up+Your+Blog but I read Sharer has been retired for Like. Am I missing something incredibly simple? I read there is also a way to force FB to rescrape every time you click Like/Recommend instead of going through the Debugger, but I couldn't understand how it fit into the javascript. Any help in this would be truly appreciated. cheers frank
0
[ 2, 1886, 101, 18, 27, 2478, 568, 993, 13478, 8184, 23855, 65, 47, 7096, 45, 22039, 800, 3726, 3726, 31, 22, 195, 677, 51, 527, 27, 48, 17, 13, 22254, 17, 302, 22254, 13, 5, 13349, 147, 14, 1797, 15286, 27, 13, 13478, 6, 51, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 fetch songs from ipodlibrary and play using AVPlayer === i want to select songs from ipod Library and play it using avplayer i want the music to continue playing even after the app goes to background i am new to iOS programming can anyone help me out .. Thanks
0
[ 2, 184, 20, 18312, 916, 37, 31, 10670, 1210, 2559, 622, 17, 418, 568, 14026, 14049, 800, 3726, 3726, 31, 259, 20, 5407, 916, 37, 31, 10670, 1248, 17, 418, 32, 568, 14026, 14049, 31, 259, 14, 232, 20, 1816, 791, 166, 75, 14, 4865...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
System.Diagnotics.Process.Start() doesnt work in IIS === i have a trouble with Process.Start(). I need to execute Adobe.exe with process.start event. it works fine on my local but when i deploy the project in server, nothing happened. I have some pdf files in database. I saved them in a folder in server from client and i have to send them to printer automatically. Its run in my local but in server its not working. I suppose its about the iis rights. Anyone has any idea about this problem? string sReport = "C:\\Documents and Settings\\" + persid + "\\Desktop\\ADAYDOKUMAN\\" + adayno + ".pdf"; //pdf files folder path ProcessStartInfo psInfo = new ProcessStartInfo(); psInfo.FileName = @"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"; //Adobe Reader.exe path in the server psInfo.Arguments = String.Format("/s /o /h /p{0}", sReport); psInfo.WindowStyle = ProcessWindowStyle.Hidden; psInfo.CreateNoWindow = true; psInfo.UseShellExecute = true; Process process = Process.Start(psInfo); if (!process.WaitForExit(10000))// Should i use process kill ? or not? { process.Kill(); }
0
[ 2, 329, 9, 1115, 21887, 11677, 9, 16835, 9, 13680, 5, 6, 5886, 170, 19, 595, 18, 800, 3726, 3726, 31, 57, 21, 2572, 29, 953, 9, 13680, 5, 6, 9, 31, 376, 20, 15644, 20299, 9, 1706, 62, 29, 953, 9, 13680, 807, 9, 32, 693, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
VHD consumes more space === I tried both Win 8 CP, RP. Both I installed on VHD that I created thru Win 7 Disk Management Utility. At CP time, I think I have chosen "Fixed size 60 GB", but not sure (not rememberig clearly). VHD was created almost instantly. When I boot up Win "7", it showed only that much memory utilized by VHD, as the size of Win 8 installed in it (9GB) At RP time, I chosen "Fixed size 60 GB", it took15-20 min to create VHD. Also when I booted Win "7" it showed up that VHD contained full 60 GB, while when I booted Win 8, it showed that the installation is of 9-10 GB. So now am feeling as if I wasted some considerable GBs. What may have gone wrong?
0
[ 2, 566, 252, 43, 16447, 18, 91, 726, 800, 3726, 3726, 31, 794, 156, 628, 469, 9750, 15, 13, 6952, 9, 156, 31, 4066, 27, 566, 252, 43, 30, 31, 679, 19637, 628, 453, 8582, 1097, 10082, 9, 35, 9750, 85, 15, 31, 277, 31, 57, 251...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Arrays using file_put_contents === Lets say I have 2 arrays . $arr1=array("foo"=>"bar", 1=>"one", 2=>"two"); $arr2=array("h"=>"eich", 3=>"three", 4=>"four"); By using file_put_contents I am able to print the array into a new php file something like this : <?php $arr1 = Array ( "foo"=>"bar", 1=>"one", 2=>"two" ) //need a comma here $arr2 = Array ( "h"=>"eich", 3=>"three", 4=>"four" )//need a comma here My question is , How can I get a comma after the end of each array ?
0
[ 2, 7718, 18, 568, 3893, 1, 4881, 1, 25424, 18, 800, 3726, 3726, 6884, 395, 31, 57, 172, 7718, 18, 13, 9, 5579, 20870, 165, 3726, 8576, 93, 5, 7, 4120, 111, 7, 3726, 1, 7, 1850, 7, 15, 137, 3726, 1, 7, 849, 7, 15, 172, 3726...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 select elements on a given point in AutoCAD? === I'm currently porting some AutoCAD VBA code to .NET and came across the following part: Dim oSSetObj As AcadSelectionSet = Nothing oSSetObj = ThisDrawing.SelectionSets.Add(SelSet_Prev) oSSetObj.SelectAtPoint(pInsertionPoint) So, I have a given point and I want to select all elements at this point. I took a look at different methods of the `SelectionSet` and the `Editor` class, but none of them seem to fit to my requirement. How can I select all elements in AutoCAD .NET at a given point? The solution should work in AutoCAD 2008 and 2011.
0
[ 2, 184, 20, 5407, 2065, 27, 21, 504, 454, 19, 3108, 13489, 60, 800, 3726, 3726, 31, 22, 79, 871, 1295, 68, 109, 3108, 13489, 566, 969, 1797, 20, 13, 9, 2328, 17, 281, 464, 14, 249, 141, 45, 5937, 19504, 11914, 11741, 28, 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, 1, 1, 1, 1, 1, 1, 1...
How to use Liferay features in my web application === I am new to Liferay. I have gone through its features and they are really awesome under single roof. My requirement is - I want to build a java web application using Liferay's features like - Alloy UI, Web Content Management, Role-Based workflow, authentication & authorization ... but this application should not be deployed on Portal because we do not require portal features and it will be overhead to us. Is there any way that I can use Liferay's features in my web application and directly deploy it on web/application server ? I have found one result with title "How to make separate web application in Liferay" but it does not say if we can use liferay features in our own web application. Thanks, Vinay
0
[ 2, 184, 20, 275, 201, 2787, 967, 19, 51, 2741, 3010, 800, 3726, 3726, 31, 589, 78, 20, 201, 2787, 9, 31, 57, 1042, 120, 82, 967, 17, 59, 50, 510, 13706, 131, 345, 2372, 9, 51, 8981, 25, 13, 8, 31, 259, 20, 1895, 21, 8247, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 - any ways to create standalone GUI apps for PC/Mac? === I'm interested are there any ways to create completely standalone desktop apps on JAVA? I mean to pack JAVA runtimes in distribution package, build apps for MAC/PC running *.jar files and get completely cross-platform software not depending on JAVA installed on target machine? Thanks!
0
[ 2, 8247, 13, 8, 186, 2847, 20, 1600, 26986, 9457, 4865, 18, 26, 5168, 118, 6893, 60, 800, 3726, 3726, 31, 22, 79, 3158, 50, 80, 186, 2847, 20, 1600, 1524, 26986, 17404, 4865, 18, 27, 8247, 60, 31, 884, 20, 3607, 8247, 485, 891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 change datables row color? === I have this datatable That I want to have different row color for each row, I am using the following code but the class is never added var oTableNE = $('#tabelNE').dataTable({ "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { // Bold the grade for all 'A' grade browsers if ( aData[8] == "Submitted" ) { $('tr', nRow).addClass("submittedColor"); console.log("Change Color by adding CSS Class" + " nRow " +nRow + " " +aData[0] + " | " +aData[1] + " | " +aData[2]+ " | " +aData[8]); }else{ console.log("Don't Change Color" + " nRow " +nRow + " " +aData[0] + " | " +aData[1] + " | " +aData[2]+ " | " +aData[8]); } } });
0
[ 2, 184, 8, 262, 753, 1054, 2854, 18, 3131, 1665, 60, 800, 3726, 3726, 31, 57, 48, 1054, 5924, 30, 31, 259, 20, 57, 421, 3131, 1665, 26, 206, 3131, 15, 31, 589, 568, 14, 249, 1797, 47, 14, 718, 25, 243, 905, 4033, 635, 5924, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Floating a DIV right causes elements to wrap in IE7 === I'm having a problem with floating a container to the right in IE7. Everything looks fine in IE8+, Firefox, Chrome, and Safari but the elements within the container wrap for some reason in IE7. I've set up a fiddle at http://jsfiddle.net/aagC9/. The problem I'm seeing is visible in the IE7 Browser Mode/Document Mode found in IE9 (it's also in IE7 on XP but I figured this would be easier for people to check out). While it seems like many people have run into similar problems, their solutions haven't worked for me. I've tried adding `overflow: hidden` and `overflow: visible` to both the container and elements in various combinations. I also tried setting a fixed width on the `.message` container, but that didn't seem to have any effect either. While I could just use a fixed left margin on `.message`, it doesn't work 100% since the IE7 doesn't support the box-sizing model. Does anybody know the secret to getting this to work in IE7 with the float? Thanks!
0
[ 2, 8319, 21, 13, 12916, 193, 4047, 2065, 20, 8118, 19, 13, 660, 465, 800, 3726, 3726, 31, 22, 79, 452, 21, 1448, 29, 8319, 21, 12147, 20, 14, 193, 19, 13, 660, 465, 9, 796, 1879, 1123, 19, 13, 660, 457, 2430, 15, 535, 18219, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JTA CMT transaction boundaries - where transactions start and end? === I've got a problem in my JEE app - in general, I persist one object, send a JMS, and on MDB I'm trying to find that object - sometimes it works, but sometimes I receive null on JPA find. I suspect that transaction didn't finish, but I can't find solution for this. I'm not sure if I understand correctly - in CMT, transaction starts in the moment of invocation a method of Session Bean from @Local or @Remote interface? What if I have a chain of methods in this Session Bean and only one of them persist my object - does all chained methods will be invoked in one transaction? What if some of them are also exposed in interface? Sending JMS is one of the chained methods - should I rather also expose this method in interface and call it after method that persist my object? What if I wouldn't want to expose that method in interface? Sorry for any lack of EJB knowledge. Thanks for any help :)
0
[ 2, 487, 536, 2390, 38, 12799, 6361, 13, 8, 113, 13147, 799, 17, 241, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 1448, 19, 51, 13, 13412, 4865, 13, 8, 19, 297, 15, 31, 22084, 53, 3095, 15, 2660, 21, 487, 79, 18, 15, 17, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Controls out side update panel lose data === I'm using an update panel to add some items to a grid view So I have a grid view and a text box to write data on and a button to submit data to grid all those controls inside an update panel out the update panel I have a text box which show the master entity data I select data from the db source then bind the text box out side the update panel finally I should add some records to the grid as sub data from the master The issue is when submit the button inside the update panel I lose the data from text box out side the grid ! As I think the data inside the update panel only should be changed when the button click even fired ! Any idea !
0
[ 2, 8671, 70, 270, 11100, 4113, 2926, 1054, 800, 3726, 3726, 31, 22, 79, 568, 40, 11100, 4113, 20, 3547, 109, 3755, 20, 21, 7354, 1418, 86, 31, 57, 21, 7354, 1418, 17, 21, 1854, 1649, 20, 2757, 1054, 27, 17, 21, 5167, 20, 12298, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 - Throwing fatal exception where it wasn't before === Explanation at the end of the code Java: void GetNextQuestion() { QuestNum++; /// ERROR ON VERY NEXT LINE ProgressBar pbar = (ProgressBar)this.findViewById(R.id.progressBar2); TextView tvSection = (TextView)this.findViewById(R.id.section); TextView tvSubsection = (TextView)this.findViewById(R.id.subsection); TextView tvQuest = (TextView)this.findViewById(R.id.quest); if(QuestNum > 0 && QuestNum < 180) { tvSection.setText(R.string.s1); tvSubsection.setText(R.string.ss1); spin.setSecondaryProgress((int)((QuestNum/180) * 1000)); } if(QuestNum > 179 && QuestNum < 285) { tvSection.setText(R.string.s2); tvSubsection.setText(R.string.ss2); } } XML: <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" xmlns:app="http://schemas.android.com/apk/lib/com.google.ads"> <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"> <ImageView android:id="@+id/icon" android:layout_width="57dp" android:layout_height="54dp" android:src="@drawable/devil" /> <TextView android:id="@+id/section" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_toRightOf="@+id/icon" android:text="@string/nunca" android:textAppearance="?android:attr/textAppearanceLarge" /> <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:visibility="invisible" /> <TextView android:id="@+id/subsection" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/section" android:layout_alignParentRight="true" android:layout_below="@+id/icon" android:text="@string/nunca" android:textAppearance="?android:attr/textAppearanceSmall" /> <ImageView android:id="@+id/help" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/helpico" /> <ImageView android:id="@+id/exit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/subsection" android:layout_alignParentRight="true" android:src="@drawable/exitico" /> <TextView android:id="@+id/haveyou" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/subsection" android:layout_marginTop="18dp" android:text="@string/nunca" android:textAppearance="?android:attr/textAppearanceMedium" /> <TextView android:id="@+id/quest" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:text="@string/load" android:textAppearance="?android:attr/textAppearanceMedium" /> <Button android:id="@+id/butyes" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_above="@+id/progressBar2" android:layout_marginBottom="30dp" android:text="Yes" /> <Button android:id="@+id/butno" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_above="@+id/progressBar2" android:layout_marginBottom="30dp" android:text="No" /> <ProgressBar android:id="@+id/progressBar2" style="?android:attr/progressBarStyleHorizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:max="1000" android:progress="0"/> </RelativeLayout> <com.google.ads.AdView android:id="@+id/adView" android:layout_width="fill_parent" android:layout_height="wrap_content" app:adSize="BANNER" app:adUnitId="a14ffb06b21e68e" app:loadAdOnCreate="true" > </com.google.ads.AdView> </LinearLayout> Error: E/AndroidRuntime(20649): FATAL EXCEPTION: main E/AndroidRuntime(20649): java.lang.ClassCastException: android.widget.Button at com.ndai.ptest.a1000test.GetNextQuestion(a1000test.java:146) at com.ndai.ptest.a1000test$QuestAnsTask.onPostExecute(a1000test.java:3319) at com.ndai.ptest.a1000test$QuestAnsTask.onPostExecute(a1000test.java:1) at android.os.AsyncTask.finish(AsyncTask.java:417) at android.os.AsyncTask.access$300(AsyncTask.java:127) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) here is what i don't understand...it is giving me a casting error...i am casting a progressbar tp a progressbar...am i just missing a typo or something...i just need an extra set of eyes on this one
0
[ 2, 13005, 13, 8, 6033, 8773, 5391, 113, 32, 526, 22, 38, 115, 800, 3726, 3726, 5764, 35, 14, 241, 16, 14, 1797, 8247, 45, 11364, 164, 20021, 24652, 5, 6, 13, 1, 7769, 6336, 20512, 73, 12894, 118, 7019, 27, 253, 328, 293, 3455, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 view all the attributes of a backbone.js model? === Is there an easy way to view all the attributes of a backbone.js model that I could access with @model.get()? `alert @model.attributes` only displays [object Object].
0
[ 2, 184, 107, 31, 1418, 65, 14, 13422, 16, 21, 24036, 9, 728, 18, 1061, 60, 800, 3726, 3726, 25, 80, 40, 2010, 161, 20, 1418, 65, 14, 13422, 16, 21, 24036, 9, 728, 18, 1061, 30, 31, 110, 1381, 29, 13, 1, 13998, 9, 3060, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Copy a list of news posting from a public news website to my website(PHP, HTML5) === I am a new web developer. I receive a project that ask me get the list of toronto news from CP24.com, and display the list in my website. The list must be filter out by time. I have no idea where to start it, anyone can help me? I am using HTML5 and PHP.
4
[ 2, 4344, 21, 968, 16, 996, 15669, 37, 21, 317, 996, 2271, 20, 51, 2271, 5, 26120, 15, 13, 15895, 264, 6, 800, 3726, 3726, 31, 589, 21, 78, 2741, 10058, 9, 31, 2588, 21, 669, 30, 1349, 55, 164, 14, 968, 16, 2785, 996, 37, 975...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 good way to capture a TextReader in a closure but still dispose of it properly? === This is a simplified example, to isolate the purpose of the question. In my actual scneario, the ColumnReader returned by GetColumnReader will actually do more work than merely ReadLine. If I run the following program, I will get an error when I try to call Reader(), because of course the TextReader has already been disposed by the using statement. public class Play{ delegate string ColumnReader(); static ColumnReader GetColumnReader(string filename){ using (TextReader reader = new StreamReader(filename)){ var headers = reader.ReadLine(); return () => reader.ReadLine(); } } public static void Main(string[] args){ var Reader = GetColumnReader("Input.tsv"); Console.WriteLine(Reader()); } } Alternatively, I can remove the "using" and directly declare the TextReader, which would function, but now we no longer have a guarantee that the TextReader will be eventually closed. Is there a way to add a "destructor" to the returned lambda function where I might be able to Dispose of the TextReader as soon as the lambda function goes out of scope (no more references)? I also welcome other suggestions but wish to keep the basic closure structure (that is, fits into the scope of the question).
0
[ 2, 98, 25, 21, 254, 161, 20, 3683, 21, 1854, 10647, 106, 19, 21, 7790, 47, 174, 17913, 16, 32, 7428, 60, 800, 3726, 3726, 48, 25, 21, 13, 11268, 823, 15, 20, 25068, 14, 2131, 16, 14, 1301, 9, 19, 51, 3463, 4729, 556, 8756, 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...
Zend Navigation: defining an active branch for an action which is utside the navigation hierarchy === I have a presistent requirement which causes me problems when using Zend Navigation. A simplified example would be a system which has a database entity like "albums", for which the user needs a "list", "add", "edit" and "delete" page. The "list" and "add" pages are included in the menu system, but the "edit" and "delete" pages, being specific to an particular "album" are linked to from the "list" page. The issue is that navigating to an "edit" or "delete" page causes the "albums" menu branch to go inactive. Obviously this is because those pages are not in the navigation hierarchy. I'm looking for: 1. A good way to put these pages in the navigation hierarchy, but not display them. 2. A way to define the currently active branch from within the controller, so that I can keep the appropriate branch of the menu active. 3. A method I have not thought of which accomplishes this. Thanks
0
[ 2, 10526, 43, 8368, 45, 14684, 40, 1348, 1686, 26, 40, 1028, 56, 25, 13, 1982, 1416, 14, 8368, 14417, 800, 3726, 3726, 31, 57, 21, 782, 18, 702, 2291, 8981, 56, 4047, 55, 1716, 76, 568, 10526, 43, 8368, 9, 21, 13, 11268, 823, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JUnit to JavaProject === I have a question with regards to JUnit. I create a jar file that contains TestSuite and TestCases. (JUnit3) Then I load these jar files and let the users select which TestCases to run, I then build programmatically the TestSuite with the corresponding chosen TestCases. (done) However I could not call the JUnit View in Eclipse. I read the code and it needs to be in JavaProject or JavaElement. Any idea how this can be achieved?
0
[ 2, 7446, 242, 20, 8247, 21011, 800, 3726, 3726, 31, 57, 21, 1301, 29, 14179, 20, 7446, 242, 9, 31, 1600, 21, 5112, 3893, 30, 1588, 1289, 12352, 62, 17, 1289, 10325, 18, 9, 13, 5, 8753, 242, 240, 6, 94, 31, 6305, 158, 5112, 648...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sending large data from a server to another === I am using CURL to send large amounts of data between servers , am using POST , is this OK or is there any better/standard way to send large serialized data with curl ? the problem is in the max-post-size in the php settings , i have to change it (default 2MB) . i didn't encounter any problems with this yet , but when the system will be online it is possible that data larger than 50MB will be sent each time ! Any ideas ? Thank you .
0
[ 2, 4907, 370, 1054, 37, 21, 8128, 20, 226, 800, 3726, 3726, 31, 589, 568, 14320, 20, 2660, 370, 8545, 16, 1054, 128, 17595, 13, 15, 589, 568, 678, 13, 15, 25, 48, 5854, 54, 25, 80, 186, 574, 118, 15566, 161, 20, 2660, 370, 278...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Closing and opening a Form on the same monitor on dual monitor setups === I have been looking around SO and found these two articles: * http://stackoverflow.com/questions/937298/restoring-window-size-position-with-multiple-monitors * http://stackoverflow.com/questions/495380/c-how-to-make-a-form-remember-its-bounds-and-windowstate-taking-dual-monitor The problem is that these article is in the ball park of my problem, yet I can't use them as I see it (unless I make my solution really complicated). While the article talk about restoring a Form when they have closed their application completely, that is not exactly what I am trying is to accomplish. What I am doing is closing and opening the same form within the same running application. When this happen I want it to have the same exact location, state and size as it where when i closes. This is straight forward because I can save the location, state and size from the form object, dispose it and apply the old values to my new form. This works, but if I have a maximized window on monitor 2, and the close/open function runs, it opens the form maximized on monitor 1. Is there any easy way to keep it on monitor 2 in the case above, or do I have to dive into complicated libraries?
0
[ 2, 4239, 17, 1214, 21, 505, 27, 14, 205, 7626, 27, 5747, 7626, 18161, 18, 800, 3726, 3726, 31, 57, 74, 699, 140, 86, 17, 216, 158, 81, 3376, 45, 1637, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 4069, 4009, 3804,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cannot transfer blob from MySQL to H2 === I have some blob hexadecimal values that I exported from a MySQL database using MAMP. I tried to add those values to a H2 database but I keep getting the error : org.h2.jdbc.JdbcSQLException: Hexadecimal string with odd number of characters: "80273753912952185238922745508880797601482513992540829416944108482201678079823009423240796439787688076562876906583780517704249256776629049440054030707230103901187860416530898080584543691951511619479802824069658267005899514817053628822676904964354186008390099680162497341280836375590099576180828248580706583256766125057680523862652582731318422096302127828322568212884418137380647350895148022669223845592468192584084729728626393575544"; SQL statement: INSERT INTO `StatisticsExplanationActivity` VALUES(2, '2012-06-01 11:36:36', '0', '2012-06-01 11:36:37', 1, 16, 0x00aced0005737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a6578700000000577040000000a7400196d757365756d507265666572656e63655f6f7269656e74616c7400166d757365756d507265666572656e63655f70686f746f740014696465616c686f6c79646179735f75726261696e7400176e696768744576656e696e67486f6262795f6d757369637400106d75736963616c54617374655f706f7078) -- (2, '2012-06-01 11:36:36', '0', '2012-06-01 11:36:37', 1, 16, 80273753912952185238922745508880797601482513992540829416944108482201678079823009423240796439787688076562876906583780517704249256776629049440054030707230103901187860416530898080584543691951511619479802824069658267005899514817053628822676904964354186008390099680162497341280836375590099576180828248580706583256766125057680523862652582731318422096302127828322568212884418137380647350895148022669223845592468192584084729728626393575544) [90003-166] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) at org.h2.message.DbException.get(DbException.java:169) at org.h2.message.DbException.get(DbException.java:146) at org.h2.util.StringUtils.convertHexToBytes(StringUtils.java:990) The same INSERT line works fine with MySQL. I saw on some other topic that this may happen when the H2's multi-threaded mode is enabled. I wanted to give it a try but I have no idea how to set that parameter using Play! 1.2.x.
0
[ 2, 1967, 2617, 334, 10904, 37, 51, 18, 22402, 20, 746, 135, 800, 3726, 3726, 31, 57, 109, 334, 10904, 24, 6791, 9522, 49, 3482, 4070, 30, 31, 18011, 37, 21, 51, 18, 22402, 6018, 568, 1216, 2554, 9, 31, 794, 20, 3547, 273, 4070, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
dismissModalViewController issue in iOs === I have three view controllers, say A, B and C. I am navigating through this views like follows; **A** -presenting-> **B** -presenting-> **C** -presenting-> **B** And from **B**, if I dismiss I want to navigate to **C**. But instead of that, now it is moving to **A**. I can't use dismiss for navigation from **C** to **B** (some internal issues). So how can I fix this? Please help.
0
[ 2, 14372, 20756, 4725, 12898, 1252, 1513, 19, 13, 7760, 800, 3726, 3726, 31, 57, 132, 1418, 9919, 18, 15, 395, 21, 15, 334, 17, 272, 9, 31, 589, 1775, 13227, 1880, 120, 48, 4146, 101, 2415, 73, 13, 1409, 58, 1409, 13, 8, 3914, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ScriptManager.RegisterStartupScript not working in mozila === I am trying to open jquery colorbox from code behind cs file. It works in chrome but mozila or internet explorer its not working .aspx code: <script type="text/javascript"> function OpenColorBox() { $.colorbox({ opacity: 0.1, width: '350px', height: '350px', iframe: true, href: 'Test.aspx', onLoad: function () { $('#cboxClose').remove(); }, }); } </script> <asp:Button ID="Button2" runat="server" Text="Save this Search Criteria" CssClass="srchBtn btnNew" OnClick="Call_Click" /> .cs File protected void Call_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this,this.GetType(), "alert", "OpenColorBox(); return false;", true); } What i missing in this???If anyone have any idea about it than please help me in this.
0
[ 2, 3884, 22256, 9, 12463, 9959, 13680, 576, 8741, 52, 638, 19, 13, 18057, 6048, 800, 3726, 3726, 31, 589, 749, 20, 368, 487, 8190, 93, 1665, 5309, 37, 1797, 439, 272, 18, 3893, 9, 32, 693, 19, 13, 12985, 47, 13, 18057, 6048, 54,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MAGENTO: How to save ip address on order inserted in backend? === Magento save in the table sales_flat_order the ip address if a customer insert an order but it does not save the ip addrss if the order is inserted in the admin area. Can i save this information? and how to? I have magento 1.7.0.2 (latest)
0
[ 2, 4723, 17050, 45, 184, 20, 2079, 15735, 3218, 27, 389, 14215, 19, 97, 2451, 60, 800, 3726, 3726, 4723, 17050, 2079, 19, 14, 859, 2598, 1, 13830, 1, 7861, 14, 15735, 3218, 100, 21, 7705, 14692, 40, 389, 47, 32, 630, 52, 2079, 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 can I make this regex shortet? === I wrote this regex: \\s+(?:([^:]+):)(?:([^:]+):)(?:([^:]+):)(?:([^:]+):) to parse such things: lvt vgt mwi-ao 44.00m lvt_mlog 100.00 lvt2 vgt2 -wi-a- 908.00m And 1 group will be: lvt 2 group: vgt ... 4 group: 44.00m I whant to make it shorter. I try to do it in such way: \\s+(?:([^:]+):)+ But in this case it catch only last group. Result will be: 1 group: 44.00m
0
[ 2, 184, 92, 31, 233, 48, 7953, 1706, 502, 1198, 60, 800, 3726, 3726, 31, 738, 48, 7953, 1706, 45, 13, 1, 18, 2430, 5, 60, 45, 5, 2558, 1, 45, 500, 2430, 6, 45, 6, 5, 60, 45, 5, 2558, 1, 45, 500, 2430, 6, 45, 6, 5, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
map the url in such a way that it dont show file extension, querystring and shows a fake folder name === i want to show person's name in place of id in URL for example http://MyWebSite/Doc/Home.aspx?UID=6 to http://MyWebSite/Doc/Harry is it possible with url re-writing?
0
[ 2, 2942, 14, 287, 6362, 19, 145, 21, 161, 30, 32, 1049, 298, 3893, 3896, 15, 25597, 11130, 17, 1285, 21, 7031, 19294, 204, 800, 3726, 3726, 31, 259, 20, 298, 840, 22, 18, 204, 19, 209, 16, 4924, 19, 287, 6362, 26, 823, 7775, 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...
android event when url can't be opened because no internet connection === I am properly checking if device has internet connection or not but for any other reasons is not suitable for me. I need to capture event when a webview tries to open a webpage but this one could not be opened due to internet conection. Now, webview displays standard browser page "www.mypage.com could not be opened...". Which event can be handled for this? Thank you
0
[ 2, 13005, 807, 76, 287, 6362, 92, 22, 38, 44, 520, 185, 90, 2620, 2760, 800, 3726, 3726, 31, 589, 7428, 9886, 100, 3646, 63, 2620, 2760, 54, 52, 47, 26, 186, 89, 2932, 25, 52, 6445, 26, 55, 9, 31, 376, 20, 3683, 807, 76, 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...
Oracle PL/SQL how to find this syntax error? === In the Oracle PL/SQL , I have this coding, it gives me complier error. I don't know why, looks like I have everything ... Please help. Thanks ORA-06550: line 6, column 5: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: ( begin case declare end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: Code is begin for c in (select id from tmp_A) loop dbms_output.put_line(c.id); create table tmp_c as select B.name from tmp_B B where B.id = c.id; drop table tmp_c; end loop; end; /
0
[ 2, 15759, 12443, 118, 18, 22402, 184, 20, 477, 48, 22649, 7019, 60, 800, 3726, 3726, 19, 14, 15759, 12443, 118, 18, 22402, 13, 15, 31, 57, 48, 13, 15458, 15, 32, 2352, 55, 6479, 10491, 7019, 9, 31, 221, 22, 38, 143, 483, 15, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
AuthenticateAsServer won't accept PEM format certificates === X509CertificateCollection certCollec = new X509CertificateCollection(new X509Certificate[1] { xcert}); X509CertificateCollection certCollecpfx = new X509CertificateCollection(new X509Certificate[1] { pfxCert }); SSLStream.AuthenticateAsClient(apsHost, certCollec, SslProtocols.Default, false); <p>certCollec contains a certificate in PEM Format</p> <p>certCollecpfx contains a certificate in PFX Format</p> AuthenticateAsClient server only works with PFX Format even though the X509Certificate2 object for the pem and the pfx has exactly the same raw data. Why is this? It keeps telling me A call to SSPI Failed: The data was badly formatted.. Why won't it accept pem format? I then tried to export the pem format into pfx, and it still didn't accept it - same error. even though i exported it to pfx. byte[] pemCertBytes = pemCert.Export(X509ContentType.Pfx, "620fpass"); File.WriteAllBytes(@"C:\test\MyCert.pfx", pemCertBytes);
0
[ 2, 14351, 1373, 22220, 2304, 230, 22, 38, 3440, 24800, 2595, 6259, 18, 800, 3726, 3726, 993, 264, 2545, 17580, 24831, 591, 15015, 872, 13, 17580, 20410, 3319, 800, 78, 993, 264, 2545, 17580, 24831, 591, 15015, 872, 5, 2681, 993, 264, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Resource for programs w/ multiple files === I'm working on a fairly simple C program (with a main file, vector.c, vector.h), but running into these issues: - where do I put the include for a .h file if the declarations it provides are needed in both c files? - where do I put typedefs needed in all 3 files? seems like gcc complains no matter what I do. Can anyone answer these questions, or point me toward a resource I can read?
0
[ 2, 272, 6577, 26, 1726, 619, 118, 1886, 6488, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 6647, 1935, 272, 625, 13, 5, 1410, 21, 407, 3893, 15, 7497, 9, 150, 15, 7497, 9, 252, 6, 15, 47, 946, 77, 158, 1549, 45, 13, 8, 113, 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...
Cfparam for structure keys not working === <cfparam name="airInfo.leaving" type="struct" default="#structNew()#"> <cfparam name="flightInfo.depart" type="string" default="departing"> <cfparam name="flightInfo.arrive" type="string" default="arriving"> <cfset flightInfo = airInfo.leaving> <cfset fromInfo = flightInfo.depart> <cfset arriveInfo = flightInfo.arrive> <cfdump var="#flightInfo#"> This should work... I think, but I keep getting an error saying depart is undefined in flightInfo. I know I could use if structKeyExists() but this is just a snippet of a larger application. I can't be checking all the variables in that mannor, and really need to use cfparam. What am I missing from this?
0
[ 2, 10084, 6351, 79, 26, 1411, 5534, 52, 638, 800, 3726, 3726, 13, 1, 8940, 6351, 79, 204, 3726, 7, 2642, 108, 4120, 9, 7199, 8397, 7, 1001, 3726, 7, 10346, 7, 12838, 3726, 7, 5910, 10346, 2681, 5, 6, 5910, 7, 1, 13, 1, 8940, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 after clicking Share Button on Facebook === I'm trying to figure out how to redirect users to a different page in a Page Tab Application similar to [this one][1] [1]: https://www.facebook.com/cawineclub?sk=app_260001524093453
0
[ 2, 302, 14706, 75, 25590, 1891, 5167, 27, 9090, 800, 3726, 3726, 31, 22, 79, 749, 20, 1465, 70, 184, 20, 302, 14706, 3878, 20, 21, 421, 2478, 19, 21, 2478, 6523, 3010, 835, 20, 636, 1565, 53, 500, 2558, 165, 500, 636, 165, 500, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 [self setVariable:value] vs variable = value === In Objective C what scenario would I want to use `[self setVariable:value];` instead of `variable = value;` It seems as if doing a self set I'm saving myself few lines of code, but what other advantages are there? Additionally, when would I NOT want to do a self set?
0
[ 2, 568, 636, 8411, 309, 8220, 579, 45, 15165, 500, 4611, 7612, 800, 1923, 800, 3726, 3726, 19, 7038, 272, 98, 12705, 83, 31, 259, 20, 275, 13, 1, 2558, 8411, 309, 8220, 579, 45, 15165, 12660, 1, 700, 16, 13, 1, 8220, 579, 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...
jQuery .on('click') vs. .click() and .delegate('click') === I'm used to using `.click()` and `delegate('click')`, so when I read both were deprecated in recent versions of jQuery I thought I'd read up on it, but I'm scratching my head a bit. The documentation [here][1] seems to suggest that this is a drop-in replacement for [.live()][2] and [.delegate()][4], but [.click()][5] and [.bind()][3] had a different behavior, namely binding to currently existing objects, where the others bound to any objects that matched the selector pattern througout the lifespan of the DOM. In most cases, this wouldn't make a big difference, but when adding elements to your DOM dynamically, this is an important distinction. New objects matching the old pattern would *not* have listeners tied to the `click` event using `.click()`, but *would* with `.delegate()`. My question is, how does one use the `.on()` method to duplicate the behavior of both the pre-existing `.delegate()` and `.bind()`? Or is everything in the future going towards the `.delegate()` style? [1]: http://api.jquery.com/on/ [2]: http://api.jquery.com/live/ [3]: http://api.jquery.com/bind/ [4]: http://api.jquery.com/delegate/ [5]: http://api.jquery.com/click/
0
[ 2, 487, 8190, 93, 13, 9, 218, 5, 22, 150, 10129, 22, 6, 4611, 9, 13, 9, 150, 10129, 5, 6, 17, 13, 9, 24249, 3322, 5, 22, 150, 10129, 22, 6, 800, 3726, 3726, 31, 22, 79, 147, 20, 568, 13, 1, 9, 150, 10129, 5, 6, 1, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaScript code line for random image rotation === I want to add a line of JavaScript code to the existing code below that would make the images rotate randomly. In other words, when the pages loads, it's a different image every time, and they they rotate in a random order. Is there a way to just add a line or two without changing the code radically or writing a new? The code works fine as is. Thank you in advance for your help. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(function(){ $('#left-picture img:gt(0)').hide(); setInterval(function(){$('#left-picture :first- child').fadeOut().next('img').fadeIn().end().appendTo('#left-picture');}, 5000); }); </script> </head> </div> Sincerely, Alex Kustanovich ak1214@gmail.com
1
[ 2, 8247, 8741, 1797, 293, 26, 5477, 1961, 9431, 800, 3726, 3726, 31, 259, 20, 3547, 21, 293, 16, 8247, 8741, 1797, 20, 14, 3149, 1797, 1021, 30, 83, 233, 14, 3502, 21448, 21324, 9, 19, 89, 715, 15, 76, 14, 4434, 19069, 15, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to change GridEditor dynamically on column === I created a Grid and am trying to edit the grid using GridEditor, here i added the grideditor to the column c2 my code in a brief <code> GridEditor editor=new GridInlineEditing(myGrid); ColumnConfig c2= new ColumnConfig("myProperty",100,"columnHeader"); editor.addEditor(c2,new TextField()) </code> for column c2 i want two editors like first the first 3 rows i want textfield and for the remaining i want combobox Thanks in advance
0
[ 2, 184, 20, 753, 7354, 13401, 7782, 1326, 27, 4698, 800, 3726, 3726, 31, 679, 21, 7354, 17, 589, 749, 20, 9392, 14, 7354, 568, 7354, 13401, 15, 235, 31, 905, 14, 7354, 13401, 20, 14, 4698, 272, 135, 51, 1797, 19, 21, 2698, 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...
Looping within a regex search === was wondering if I could get a little help with a bit of code I've produced shown here: if re.search(r"\b2ProcessorsRequested\b", output): corelist.append("2") elif re.search(r"\b4ProcessorsRequested\b", output): corelist.append("4") elif re.search(r"\b8ProcessorsRequested\b", output): corelist.append("8") elif re.search(r"\b16ProcessorsRequested\b", output): corelist.append("16") elif re.search(r"\b32ProcessorsRequested\b", output): corelist.append("32") elif re.search(r"\b64ProcessorsRequested\b", output): corelist.append("64") elif re.search(r"\b128ProcessorsRequested\b", output): corelist.append("128") elif re.search(r"\b256ProcessorsRequested\b", output): corelist.append("256") elif re.search(r"\b512ProcessorsRequested\b", output): corelist.append("512") elif re.search(r"\b1024ProcessorsRequested\b", output): corelist.append("1024") else: corelist.append("1") The problem with this code is obviously a lot of it's repeated and also it means I can only search for a set list of cores (1,2,4 etc). How do I go about converting this code so it simply just loops from 1-1024? I thought it'd be something along the lines of this: x=0 while x < 1025: if re.search(r"\b", x, "ProcessorsRequested\b", output): corelist.append(x) break() x+=1 But I think the syntax is wrong as it says (can't remember exact wording) that I couldn't pass more than 3 parameters in the regex part. Any help would be great! I hope I've made sense and if you need any more information then please ask.
0
[ 2, 5293, 68, 363, 21, 7953, 1706, 2122, 800, 3726, 3726, 23, 5712, 100, 31, 110, 164, 21, 265, 448, 29, 21, 1142, 16, 1797, 31, 22, 195, 671, 1721, 235, 45, 100, 302, 9, 25136, 5, 139, 7, 1, 220, 135, 16835, 248, 18, 99, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using older version of Node.js Express Framework === I am experiencing this problem with Node.js express framework 3.0: https://github.com/visionmedia/express/issues/1187 I've been using express framework 2.0 and am in the process of updating my code to use the next 3.0 framework. In the above link the guy said that he reverted back to version express@3.0.0beta1 instead of the express@3.0.0beta4 in which he was having problems with. I'd like to do the same but I don't know how to specify express@3.0.0beta1 ?? Where in express do I do that? When setting up my project and using: npm install express to install express framework in my project should I be specifying the version like this: npm install express b1 any help or advice would be appreciated cheers
0
[ 2, 568, 1234, 615, 16, 15421, 9, 728, 18, 2999, 6596, 800, 3726, 3726, 31, 589, 15138, 48, 1448, 29, 15421, 9, 728, 18, 2999, 6596, 203, 9, 387, 45, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 10732, 8260, 118, 21230, 118, 12565, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Facebook App image post externally === is there a code or what is the code used on this app to be posted on a Facebook account once log in? once you finish the steps you can post the created app post the image on your Facebook page sample site: http://www.dragulator.com/ does it has to do with the API key from the Facebook account? I hope i am clear about what i want to achieve Sincerely, Jim
0
[ 2, 9090, 4865, 1961, 678, 4886, 102, 800, 3726, 3726, 25, 80, 21, 1797, 54, 98, 25, 14, 1797, 147, 27, 48, 4865, 20, 44, 6054, 27, 21, 9090, 2176, 382, 6738, 19, 60, 382, 42, 2106, 14, 2382, 42, 92, 678, 14, 679, 4865, 678, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
count total unique words contained in a field of a resultset === how can I count single words appearing in a field of a resultset? example <pre> id| myfield 1 | aaaa bbbb cccc ffff 2 | dddd eeee aaaa ffff </pre> I want to get 6 because a,b,c,d,e,f (6 unique words) I don't need a fast query, it is just a statistic calculation that will be executed rarely thanks!
0
[ 2, 2468, 600, 2619, 715, 3437, 19, 21, 575, 16, 21, 1736, 1198, 800, 3726, 3726, 184, 92, 31, 2468, 345, 715, 4870, 19, 21, 575, 16, 21, 1736, 1198, 60, 823, 13, 1, 3515, 1, 4924, 1, 51, 1109, 137, 13, 1, 21, 22160, 13, 3490...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Color (red/green) console output for ant junit tests === I'm playing with `ant` and `JUnit4` in a terminal emulator, *not* in an IDE like Eclipse. Is there an ant-native method of getting colorised test results? A google search led me to [this python script](https://github.com/eevans/color-junit); I'd prefer to utilize 'pure' `ant` if I can. For example, when I run my tests with `ant runtests`, I'd like to display the `FAILED` tests red, the `PASSED` tests green, etc.
0
[ 2, 1665, 13, 5, 2095, 118, 6852, 6, 8650, 5196, 26, 40, 38, 7446, 242, 4894, 800, 3726, 3726, 31, 22, 79, 791, 29, 13, 1, 1830, 1, 17, 13, 1, 8753, 242, 300, 1, 19, 21, 3855, 3579, 14868, 15, 1637, 1270, 2483, 19, 40, 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...
Overriding "application.html.erb" for ActiveAdmin === I'd like to use my site's layout instead of the prepackaged layout that I've implemented in my Rails app instead of using `ActiveAdmin`. I've <a href="http://stackoverflow.com/questions/8084183/how-to-give-activeadmin-its-own-application-layout-rails-newbie">seen a reference</a> to something close but it's not cutting it. I'm hoping to use my site's `application.html.erb` to provide an uniform experience all around.
0
[ 2, 84, 5175, 68, 13, 7, 2552, 20669, 9, 15895, 9, 106, 220, 7, 26, 1348, 1283, 2160, 800, 3726, 3726, 31, 22, 43, 101, 20, 275, 51, 689, 22, 18, 9106, 700, 16, 14, 782, 8573, 8030, 9106, 30, 31, 22, 195, 6807, 19, 51, 2240, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CDockablePane with descendants and fixed width CDockablePane === I have my CMainFrame as the following image: ![][1] [1]: http://i.stack.imgur.com/CqYWQ.png with some parts intentionally disguised in this screenshot The top has three CDockablePanes that have been docked like: 1. MainFrame->DockPane(middlePane, top); 2. leftPane->DockToWindow(middlePane, left); 3. rightPane->DockToWindow(middlePane, right); My questions are: 1. Is it possible to have a bigger pane that contains these three panes, for the sake of minimizing them all at the same time in the View> Panes & bars (> IDR_VIEW_TOOLBAR) menu? 2. Is it possible when resizing the CMainFrame to get the left and right panes intact on size and only the middles panes adjust to resizing of the mainframe? I've done LOTS of experiments in CMainFrame::Onsize() , CMainFrame::OnSizing() and CMainFrame::OnExitSizeMove() but could not achieve anything because CDockingManager::AdjustDockingLayout always has done unwanted resizes! Thanks for the attention Sérgio
0
[ 2, 272, 11458, 579, 16660, 29, 8568, 17, 3535, 9456, 272, 11458, 579, 16660, 800, 3726, 3726, 31, 57, 51, 272, 6232, 8361, 28, 14, 249, 1961, 45, 13, 187, 2558, 500, 2558, 165, 500, 636, 165, 500, 45, 7775, 6903, 49, 9, 25325, 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...
My navbar background image for my menu buttons is being cut off at the left end side in the navbar How do I correct this? === My navigation buttons are being cut off at the left in the navbar. my button image is 300x35 and its a jpg (does that matter?) I've tried background-resize and all the combinations but to no avail. I am new at the css but understand it somewhat. This new menu is part of wordpress 3.4.1 Im trying to alter the theme "LayerPress" style.css to have a navbar exactly like "Professional Dropdwon 2 by Author: Stu Nicholls. If you would help me with this I am this is my css code `.navcontainer { border-bottom: 3px solid #292b2e; border-top: 1px solid #242527; background: url(images/three_0.gif); background-size: 900px 45px; } #nav { height: 40px; border: 10px; } #nav, #nav ul { padding: 0; margin: 0; list-style: none; line-height: 1; } #nav { margin-bottom: 1px;/* moves the whole text to left in navbar */ } #nav ul { float: left; list-style: none; margin: 0px 0px 0px 0px; padding: 0px; } #nav li { float: left; list-style: none; margin: 0px; padding: 0px; } #nav ul li { list-style: none; margin: 0px; padding: 0px; } #nav li a, #nav li a:link { color: #e3a81a; /*text color on button */ display: block; margin: 0px 3px 0px 3px; padding: 14px 26px 14px 26px; text-decoration: none; font-size: 12px; font-weight: bold; text-transform: uppercase; font-family: Arial, Helvetica, Sans-serif; } #nav li a:hover, #nav li a:active, .current-cat { background: url(images/three_1a.gif) right center no-repeat; /* hover background image */ text-decoration: none; } #nav li.current-cat a { color:#ffe400; } #nav li:hover, #nav li.sfhover { position: static; } `
0
[ 2, 51, 16048, 1850, 2395, 1961, 26, 51, 11379, 12861, 25, 142, 1077, 168, 35, 14, 225, 241, 270, 19, 14, 16048, 1850, 184, 107, 31, 4456, 48, 60, 800, 3726, 3726, 51, 8368, 12861, 50, 142, 1077, 168, 35, 14, 225, 19, 14, 16048, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 add a Twig Tag in Symfony2? === I already learned [how to create a Twig extension](http://www.slideshare.net/weaverryan/being-dangerous-with-twig-symfony-live-paris). But now I need to create a tag, because I want to do something like this: {% singleline %} <div> <p>Some text</p> </div> {% endsingleline %} Result: <div><p>Some text</p></div> Any ideas?
0
[ 2, 184, 20, 3547, 21, 19690, 3383, 19, 13, 7261, 10229, 93, 135, 60, 800, 3726, 3726, 31, 614, 2691, 636, 1544, 20, 1600, 21, 19690, 3896, 500, 5, 21127, 6903, 6483, 9, 18, 1210, 546, 16608, 9, 2328, 118, 458, 11937, 622, 210, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how do I add or subtract elapsed time from a date in the format yyyy-mm-dd hh:mm:ss and return result in the same format? === How do I subtract and/or add elapsed time to a date in the format yyyy-mm-dd hh:mm:ss? ie how do I add 16:49:13 to 2012-06-18 22:03:18 ? and also, how do I subtract 16:49:13 from 2012-06-19 14:52:31? I need the results to be in the format hh:mm:ss Thanks in advance
0
[ 2, 184, 107, 31, 3547, 54, 27031, 13, 62, 17057, 43, 85, 37, 21, 1231, 19, 14, 2595, 13, 93, 93, 93, 93, 8, 3363, 8, 8096, 13, 10681, 45, 3363, 45, 18, 18, 17, 788, 829, 19, 14, 205, 2595, 60, 800, 3726, 3726, 184, 107, 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...
SharedPreferences NullPointer Exception, static and non-static method === I am trying to draw a line graph using *afreechart* , I have saved the x and y points already using SharedPreferences. However, when I try to get some info from sharedpreferences i got an error, i suspect it has something to do with static and non-static methods not working together, but i cannot figure it out. So here's the class that where i add the x and y points: public class DrawView extends DemoView{ static int round; static int score; public DrawView(Context context) { super(context); final AFreeChart chart = createChart(); setChart(chart); } private static XYSeriesCollection createDataset() { XYSeries xyS1 = new XYSeries("Progress", true, false); //Here I try to get the info from SharedPreferences via another class Stat t = new Stat(); round =t.getround(); for(int i = 0; i < round; i++){ score = t.getscore(i); xyS1.add(i, score); } XYSeriesCollection xySC = new XYSeriesCollection(); xySC.addSeries(xyS1); return xySC; } /** * Creates a sample chart. * @param dataset the dataset. * @return A sample chart. */ private static AFreeChart createChart() { XYDataset dataset = createDataset(); AFreeChart chart = ChartFactory.createXYLineChart( "Statistics", "Rounds", "Points", dataset, PlotOrientation.VERTICAL, false, true, false); XYPlot plot = (XYPlot) chart.getPlot(); XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(); renderer.setSeriesLinesVisible(0, true); plot.setRenderer(renderer); NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis(); domainAxis.setUpperMargin(0.2); // add some annotations... XYTextAnnotation annotation = null; Font font = new Font("SansSerif", Typeface.NORMAL, 12); annotation = new XYTextAnnotation("Progress", 96, 57); annotation.setFont(font); annotation.setTextAnchor(TextAnchor.HALF_ASCENT_LEFT); plot.addAnnotation(annotation); return chart; } } And here is the class via which I try to get info from SharePreferences : public class Stat extends Activity { public static String filenamestat = "Stat"; SharedPreferences someStat; /** * Called when the activity is starting. * @param savedInstanceState */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DrawView mView = new DrawView(this); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(mView); } public int getround(){ //Here is the error someStat = getSharedPreferences(filenamestat, 0); String roundtaker = someStat.getString("round", "0"); int round = Integer.parseInt(roundtaker); return round; } public int getscore(int a){ String scoretaker = Integer.toString(a); String stringscore = someStat.getString(scoretaker, "0"); int score = Integer.parseInt(stringscore); return score; } } The LogCat 07-29 20:09:47.422: E/AndroidRuntime(414): FATAL EXCEPTION: main 07-29 20:09:47.422: E/AndroidRuntime(414): java.lang.RuntimeException: Unable to start activity ComponentInfo{at com.the.package/at com.the.package.Stat}: java.lang.NullPointerException 07-29 20:09:47.422: E/AndroidRuntime(414): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.os.Handler.dispatchMessage(Handler.java:99) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.os.Looper.loop(Looper.java:123) 07-29 20:09:47.422: E/AndroidRuntime(414): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-29 20:09:47.422: E/AndroidRuntime(414): at java.lang.reflect.Method.invokeNative(Native Method) 07-29 20:09:47.422: E/AndroidRuntime(414): at java.lang.reflect.Method.invoke(Method.java:521) 07-29 20:09:47.422: E/AndroidRuntime(414): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-29 20:09:47.422: E/AndroidRuntime(414): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-29 20:09:47.422: E/AndroidRuntime(414): at dalvik.system.NativeStart.main(Native Method) 07-29 20:09:47.422: E/AndroidRuntime(414): Caused by: java.lang.NullPointerException 07-29 20:09:47.422: E/AndroidRuntime(414): at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:146) 07-29 20:09:47.422: E/AndroidRuntime(414): at at com.the.package.Stat.getround(Stat.java:33) 07-29 20:09:47.422: E/AndroidRuntime(414): at at com.the.package.DrawView.createDataset(DrawView.java:50) 07-29 20:09:47.422: E/AndroidRuntime(414): at at com.the.package.DrawView.createChart(DrawView.java:71) 07-29 20:09:47.422: E/AndroidRuntime(414): at com.the.package.DrawView.<init>(DrawView.java:38) 07-29 20:09:47.422: E/AndroidRuntime(414): at com.the.package.Stat.onCreate(Stat.java:26) Thank You A LOT in advance and i apologize for the poor english.
0
[ 2, 2592, 306, 28018, 18, 16203, 3132, 106, 5391, 15, 12038, 17, 538, 8, 18077, 2109, 800, 3726, 3726, 31, 589, 749, 20, 2003, 21, 293, 7210, 568, 1637, 58, 4639, 5433, 38, 2483, 13, 15, 31, 57, 4377, 14, 993, 17, 13, 93, 819, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tabtastic, javascript component ... how to addeventlistener to capture tab click === I am using a 3rd party javascript component called Tabtastic http://phrogz.net/js/tabtastic/index.html that builds tab systems. How do you *properly* capture tab mouseevents?
0
[ 2, 6523, 38, 9428, 15, 8247, 8741, 5912, 13, 9, 9, 9, 184, 20, 3547, 4943, 38, 13891, 106, 20, 3683, 6523, 10840, 800, 3726, 3726, 31, 589, 568, 21, 203, 897, 346, 8247, 8741, 5912, 227, 6523, 38, 9428, 7775, 6903, 3971, 13692, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
onClick should render a panel with the JSF === I have a front end code when click on button it will set the toggleButton to true which will render the center page. Instead calling the server for setting the toggle button to true, i want to do it within the browser as it make more sense. How to do that? My present code is below, which will set the toggle variable in server and then changes in the browser. **Current** xhtml -------------- <p:commandButton value="create" action="#{mybean.showCreateForm}" /> <p:panel render#{mybean.showForm} /> Bean ---------------- public void showCreateForm(){ showForm=true; } **Need to be** ------------------ <p:commandButton value="create" action="#{mybean.showCreateForm}" onclick"showform=true"/> <p:panel render#{mybean.showForm} /> I just demonstrated in the above example which communicate the server before rendering createform. How should i do it in the client side only using Primefaces or JSF
0
[ 2, 27, 150, 10129, 378, 16535, 21, 4113, 29, 14, 487, 18, 410, 800, 3726, 3726, 31, 57, 21, 431, 241, 1797, 76, 10840, 27, 5167, 32, 129, 309, 14, 20, 263, 4875, 811, 444, 20, 1151, 56, 129, 16535, 14, 459, 2478, 9, 700, 2555,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 stop SimpleButtons from flickering on mouseDown? === I've created a button in Flash Pro with different up, over, down and hitTest states. When I move the mouse over it, it switches from up to over. When I press the mouse down, it briefly goes from over to up again for a single frame, then switches to the down state. I'm not sure if this is considered a bug, but I think it's been happening since AS3 was released. [This is the only thread][1] I can find on the subject. Since it's been a few years and it's still happening, does anyone have any new advice on how to stop AS3 SimpleButtons from flickering (showing the up state) on mouseDown? Failing that, if the only way is to roll my own button, does anyone have an example of a homegrown button class that supports a custom hitTest shape? [1]: http://www.kirupa.com/forum/showthread.php?342796-Button-Flicker-on-MouseDown
0
[ 2, 184, 107, 31, 747, 1935, 811, 444, 18, 37, 22399, 27, 7567, 2968, 60, 800, 3726, 3726, 31, 22, 195, 679, 21, 5167, 19, 4433, 895, 29, 421, 71, 15, 84, 15, 125, 17, 770, 10543, 202, 9, 76, 31, 780, 14, 7567, 84, 32, 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...
filtering jquery mobile listview cause the search not working? === I am trying to add filter button to listview element. when I press the button it fadeOut all the "li" with property answer=0. it works ok, but after I invoke my filter the search field stop working. any idea?? my func: filterList = function (args) { //-7 -->show all if (args.length > 0 && args[0] != "-7" && args[0] != -7) { var query = "li[answer='" + args[0] + "']"; $(query).fadeIn(); //.show(); // toggle("show"); var query = "li[answer!='" + args[0] + "']"; $(query).fadeOut(); //.hide(); // toggle("hide"); } else {//show all var query = "li[answer!='" + args[0] + "']"; $(query).fadeIn();//.show(); } //I tried all this //$("#ListViewCont").appendTo(".ui-page").trigger("refresh"); //$("#ListViewCont").trigger("refresh"); //$("#ListViewCont").listview("refresh"); //$('#ListViewCont ul').listview('refresh'); //$("#search-results-list").listview("refresh"); //$('#data-list').listview('refresh'); $("#ListViewCont").listview("create"); } I am generate the objects dynamically with js code and server side so I don't have the html my DOM View: <ul id="ULContactsList" data-role="listview" data-filter="true" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow"> <li userid="052f379c-8ccc-d5ac-4246-22ca57db5fbf" answer="1" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-screen-hidden ui-corner-top ui-btn-up-c" style="display: block;"> <div class="ui-btn-inner ui-li ui-corner-top"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit">QQ</a> </div> <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span> </div> </li> <li userid="052f379c-8ccc-d5ac-4246-22ca57db5fbf" answer="1" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-screen-hidden ui-btn-up-c" style="display: block;"> <div class="ui-btn-inner ui-li"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit">WWW</a> </div> <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span> </div> </li> <li userid="052f379c-8ccc-d5ac-4246-22ca57db5fbf" answer="1" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-screen-hidden ui-btn-up-c" style="display: block;"> <div class="ui-btn-inner ui-li"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit">EEEE</a> </div> <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span> </div> </li> <li userid="052f379c-8ccc-d5ac-4246-22ca57db5fbf" answer="1" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-screen-hidden ui-btn-up-c" style="display: block;"> <div class="ui-btn-inner ui-li"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit">RRRRR</a> </div> <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span> </div> </li> </ul>
0
[ 2, 25272, 487, 8190, 93, 3241, 968, 4725, 1679, 14, 2122, 52, 638, 60, 800, 3726, 3726, 31, 589, 749, 20, 3547, 11945, 5167, 20, 968, 4725, 4520, 9, 76, 31, 901, 14, 5167, 32, 11381, 1320, 65, 14, 13, 7, 1210, 7, 29, 1354, 162...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Refactoring JavaScript code in regard to a lot of DOM methods === I'm a beginner in JavaScript, and i'm writing a simple To-do list application. That accepts user input and adds it as a task in a form of a `checkbox`. The problem is that, the code has become more and more repetitive, I tried to make functions for the most repeating parts. But i feel that there's a better way to do that using some kind of DOM native functions. Here's my code (i'm writing a comment where i feel that there're better choice to make): window.onload = function(){ var textBox = document.getElementById("taskInput"), submitBtn = document.getElementById("submit"), taskPool = document.getElementById("todoTask"), resetBtn = document.getElementById("reset"), taskArr = [], i = 0 ; var createButton = function(btnID){ //This is a function for creating buttons var newBtn = document.createElement("a"); newBtn.id = btnID; newBtn.innerHTML = btnID.charAt(0).toUpperCase() + btnID.slice(1); newBtn.className = "dynamicButton"; if(arguments[1]){ newBtn.style.display = arguments[1]; } return newBtn; } submitBtn.disabled = true; resetBtn.disabled = true; textBox.addEventListener("keydown" ,function(){ if(textBox.value === ""){ submitBtn.disabled = true; } else { submitBtn.disabled = false; } }, true); submitBtn.addEventListener("click", function(){ for(j in taskArr){ if(taskArr[j] == textBox.value){ alert("You have entered this task before."); textBox.value = ""; textBox.focus(); submitBtn.disabled = true; return ; } } var task = document.createElement("input"); task.id = "task" + i; task.type = "checkbox"; var taskLabel = document.createElement("label"); taskLabel.htmlFor = "task" + i; taskLabel.appendChild(document.createTextNode(textBox.value)); var deleteBtn = createButton("delete"); var undoBtn = createButton("undo", "none"); var divideBtn = createButton("divide"); var taskContainer = document.createElement("p"); //A LOT of appendChild is happening .. How can i minimize that using //native DOM methods taskContainer.appendChild(task); taskContainer.appendChild(taskLabel); taskContainer.appendChild(deleteBtn); taskContainer.appendChild(divideBtn); taskContainer.appendChild(undoBtn); taskPool.appendChild(taskContainer); taskContainer.addEventListener("click", function(evt){ if(evt.target.type == "checkbox"){ evt.target.disabled = true; taskLabel.style.textDecoration = "line-through"; undoBtn.style.display = "inline"; divideBtn.style.display = "none"; } if(evt.target.id == "delete"){ taskArr.splice(taskArr.indexOf(taskLabel.innerHTML),1); taskPool.removeChild(taskContainer); if(taskArr.length == 0){ resetBtn.disabled = true; } } if(evt.target.id == "undo"){ task.disabled = false; task.checked = false; taskLabel.style.textDecoration = "none"; undoBtn.style.display = "none"; divideBtn.style.display = "inline"; } if(evt.target.id == "divide"){ //task dividing mechanism to be added later } }); taskArr.push(textBox.value); ++i; textBox.value = ""; textBox.focus(); submitBtn.disabled = true; resetBtn.disabled = false; }); resetBtn.addEventListener("click", function(){ while(taskPool.hasChildNodes()){ taskPool.removeChild(taskPool.firstChild); } resetBtn.disabled = true; }); }
0
[ 2, 302, 17455, 68, 8247, 8741, 1797, 19, 6731, 20, 21, 865, 16, 11859, 3195, 800, 3726, 3726, 31, 22, 79, 21, 26931, 19, 8247, 8741, 15, 17, 31, 22, 79, 1174, 21, 1935, 20, 8, 537, 968, 3010, 9, 30, 16548, 4155, 6367, 17, 1062...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Display external webpage into a webpage in my application === i want to display an external webpage (exactly as it's rendered in that site) into a webpage in my application in a way that's fast and better for SEO crawlers, and i was wondering if there's a way to do that with javaee ? if not then what is better in performance and for SEO the **XMLHTTPRequest** way or the **iframes** way. please advise with sample code or link if possible, thanks
0
[ 2, 3042, 4886, 2741, 6486, 77, 21, 2741, 6486, 19, 51, 3010, 800, 3726, 3726, 31, 259, 20, 3042, 40, 4886, 2741, 6486, 13, 5, 24110, 28, 32, 22, 18, 10877, 19, 30, 689, 6, 77, 21, 2741, 6486, 19, 51, 3010, 19, 21, 161, 30, 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...
Graph API + C# SDK: Create event without end date === I'm having an issue when I create events from my app, basically if I don't set the "end_time" parameter for the created event, Facebook creates an event that ends 3 hours after the start time. I'm using this code: var arguments = new Dictionary<string, object>(); arguments.Add("name", "My Activity"); arguments.Add("start_time", "2012/08/15 10:00"); var client = new FacebookWebClient(fbAccessToken); client.Post("/me/events/", arguments); And the event shows up correctly, the only problem is that the time says: 10:00am until 1:00pm I have tried setting the end_time parameter to an empty string and null, but in both cases it fails saying that the end time cannot be before the start time. Any ideas? Thanks
0
[ 2, 7210, 21, 2159, 2754, 272, 5910, 13, 18, 43, 197, 45, 1600, 807, 366, 241, 1231, 800, 3726, 3726, 31, 22, 79, 452, 40, 1513, 76, 31, 1600, 963, 37, 51, 4865, 15, 11374, 100, 31, 221, 22, 38, 309, 14, 13, 7, 2451, 1, 891, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cocoa PDFView only displays PDF on resize === How does one get a PDFView to display a PDF without having to resize the window or doing a scroll to force a redraw. It's as if a `setNeedsDisplay` needs to be done, yet that has no effect. I've the simplest app I can think of to display a PDF using a PDFView. Basically create a new app in Xcode and change the code to be: // AppDelegate.h #import <Cocoa/Cocoa.h> #import <Quartz/Quartz.h> @interface AppDelegate : NSObject <NSApplicationDelegate> @property (assign) IBOutlet NSWindow *window; @property (assign) IBOutlet PDFView *pdfView; @end and // AppDelegate.m #import "AppDelegate.h" @implementation AppDelegate @synthesize window = _window; @synthesize pdfView = _pdfView; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"TestPage" withExtension:@"pdf"]; PDFDocument *document = [[PDFDocument alloc] initWithURL: pdfURL]; self.pdfView.document = document; } @end I've noticed the same behaviour in the Apple code example [PDFKitLinker2][1] where one has to either scroll over the PDF or resize the window to get the PDF to display. Granted I'm new to the world of Cocoa development but I've searched and found no really small examples that show how to display a PDF. What I've produced would seem to be correct yet I have doubts given that even **PDFKitLinker2** doesn't seem to be correct. I've created a Git repo of an [Xcode project that demonstrates the issue][3] for those that have time to help and/or comment. git clone git@bitbucket.org:sotapme/pdfview_open.git Using Xcode Version 4.3.3 (4E3002) - Latest Lion. Thanks in advance for any help. [1]: http://developer.apple.com/library/mac/#samplecode/PDFKitLinker2/Introduction/Intro.html [2]: http://developer.apple.com/library/mac/#samplecode/PDFKitLinker2/Introduction/Intro.html [3]: https://bitbucket.org/sotapme/pdfview_open
0
[ 2, 24507, 13, 11124, 4725, 104, 9412, 13, 11124, 27, 302, 10454, 800, 3726, 3726, 184, 630, 53, 164, 21, 13, 11124, 4725, 20, 3042, 21, 13, 11124, 366, 452, 20, 302, 10454, 14, 1463, 54, 845, 21, 12159, 20, 558, 21, 402, 12404, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Loop through files in 1 folder and NOT any subfolders batch === I'm trying to loop through all files of .properties extension, in a root folder:"C:\ExecutionSDKTest_10.2.2\, but not any subfolders within that root folder, how can I achieve this result? Code below: FOR /R "C:\ExecutionSDKTest_10.2.2\" %%G IN (*properties) DO Echo %%G
0
[ 2, 5293, 120, 6488, 19, 137, 19294, 17, 52, 186, 972, 8814, 445, 13064, 800, 3726, 3726, 31, 22, 79, 749, 20, 5293, 120, 65, 6488, 16, 13, 9, 10890, 106, 3915, 3896, 15, 19, 21, 5900, 19294, 45, 7, 150, 45, 1, 1706, 17194, 330...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
bash conditional if and [[ === if I have if [ ! -e $dir ]; then mkdir $dir fi work, but not [[ ! -e $dir ]] || mkdir $dir why ? ## Edit with `[[ ...` I get line 34: [[ !: command not found
0
[ 2, 13158, 21206, 100, 17, 636, 2558, 800, 3726, 3726, 100, 31, 57, 100, 636, 13, 187, 13, 8, 62, 5579, 9035, 13, 12660, 94, 10804, 9035, 5579, 9035, 6028, 170, 15, 47, 52, 636, 2558, 13, 187, 13, 8, 62, 5579, 9035, 13, 500, 50...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Object-oriented client side socket application design in C++ === I've started Windows socket programming a couple of weeks ago. I've so far created a C style client application (IOCP based) that communicates with a networked hardware device in VC++ 2010. The application communicates asynchronously with the device (acting as server) through either LAN or serial port: - Create socket / or handle to serial port - Connect to server - Build command of type std::vector<BYTE> (e.g., Logon command) - Send command via socket or serial port - Receive response via socket or serial port - Disconnect from the server Now I'd like to make my existing client application more object-oriented and I've come up with the following class hierarchy (params are omitted): class IClient { public: virtual bool Connect() = 0; virtual bool Disconnect() = 0; virtual bool Send() = 0; virtual bool Receive() = 0; ... }; class Client : public IClient { public: Client(); virtual ~Client(); virtual bool Connect() = 0; virtual bool Disconnect() = 0; virtual bool Send() = 0; virtual bool Receive() = 0; ... private: std::string m_strConnectionSettings; // IP address, port number etc }; class SerialClient : public Client { public: bool Connect(); bool Disconnect(); bool Send(); bool Receive(); ... private: HANDLE m_hPort; // Handle returned by CreateFile(). DCM m_dcb; }; class SocketClient : public Client { public: SocketClient(); virtual ~SocketClient(); virtual bool Connect() = 0; virtual bool Disconnect() = 0; virtual bool Send() = 0; virtual bool Receive() = 0; ... private: SOCKET m_socket; // Handle returned by WSASocket(). }; class TcpClient : public SocketClient { public: TcpClient(); ~TcpClient(); bool Connect(); bool Disconnect(); bool Send(); bool Receive(); ... } class UdpClient : public SocketClient { public: TcpClient(); ~TcpClient(); bool Connect(); bool Disconnect(); bool Send(); bool Receive(); ... } However, my knowledge on computer network is still rudimentary so I find it difficult to translate computer networks concepts into a C++ design. For example, in the above design I don't know where “Port” comes in. If I had “Port” class and “Socket” class, would the “Port” class contain the “Socket“ class or opposite or nonsense? I'd appreciate it if you could give me some feedback regarding the design above. - I've taken a very brief look at Boost.Asio to see how it's designed. - Sorry if my question is vague.
0
[ 2, 3095, 8, 6800, 6819, 270, 18482, 3010, 704, 19, 272, 20512, 800, 3726, 3726, 31, 22, 195, 373, 1936, 18482, 3143, 21, 1335, 16, 1342, 1464, 9, 31, 22, 195, 86, 463, 679, 21, 272, 1034, 6819, 3010, 13, 5, 1963, 7439, 432, 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...
export data in excel using POI hssf WritableWorkbook === I have this DAO.. public class AreaDAO { private Database database; public AreaDAO(Database database) { this.database = database; } public List<Area> list() throws SQLException { Connection connection = null; PreparedStatement statement = null; ResultSet resultSet = null; List<Area> areas = new ArrayList<Area>(); try { connection = database.getConnection(); statement = connection.prepareStatement("select distinct img_hub, country from ifs_db limit 50"); resultSet = statement.executeQuery(); while (resultSet.next()) { Area area = new Area(); area.setImg_hub(resultSet.getString("img_hub")); area.setCountry(resultSet.getString("country")); areas.add(area); } } finally { if (resultSet != null) try { resultSet.close(); } catch (SQLException logOrIgnore) {} if (statement != null) try { statement.close(); } catch (SQLException logOrIgnore) {} if (connection != null) try { connection.close(); } catch (SQLException logOrIgnore) {} } return areas; } } this produce a list of data... How can I let the user download all the data in excel by just clicking on the link.. I' researched the we and found this...(by BalusC) response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment; filename=name.xls"); WritableWorkbook workBook = Workbook.createWorkbook(response.getOutputStream()); I place it to my servlet, how ever I'm just getting a blank worksheet... how can I use this so I can let the user download a
0
[ 2, 7487, 1054, 19, 20700, 568, 2353, 49, 746, 18, 18, 410, 20127, 579, 3783, 5199, 800, 3726, 3726, 31, 57, 48, 13, 17104, 9, 9, 317, 718, 217, 17104, 13, 1, 932, 6018, 6018, 73, 317, 217, 17104, 5, 18768, 8436, 6018, 6, 13, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Evaluating git and merge doesn't seem to work the way I expected === I'm trying to evaluate if moving to git from svn would be a viable option. I've heard that the merge in git works much better than the one in svn, but in my testing I haven't seen that. Here's what I've done: - Created a file called main.c #include <stdio.h> function main() { int myNum = 10; printf("Hi, my num is %d\n", myNum); return 0; } - git init, git add ., git commit -m "Created main.c", and pushed to origin master - In the main.c file, I've purposely not adhered to a coding standard and named the function incorrectly. - Another user comes along and changes the code to adhere to a coding standard (the curly braced is moved to the next line), commits and pushes #include <stdio.h> function main() { //This was changed to a specific coding standard int myNum = 10; printf("Hi, my num is %d\n", myNum); return 0; } - I add a function before main, commit and try to push and it tells me that my master branch is not up to date, so I do a git pull origin master to bring it up to date, and then I get conflicts <<<<<<< HEAD function main() { int myNum = 10; ======= function main() { int myNum = 10; >>>>>>> f0aceffb16f0a24638493367f4be6f2a09e22a82 **Question**:Can anybody tell me if I'm doing this incorrectly? Are there certain steps that I am leaving out and thus causing myself grief? Perhaps I don't really understand how merge is supposed to be simpler than svn? Thanks for taking the time, Chris
0
[ 2, 26764, 13, 10404, 17, 12666, 1437, 22, 38, 2260, 20, 170, 14, 161, 31, 1727, 800, 3726, 3726, 31, 22, 79, 749, 20, 13, 15599, 100, 1219, 20, 13, 10404, 37, 13, 18, 16578, 83, 44, 21, 17347, 4255, 9, 31, 22, 195, 752, 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...
Create a post using ajax and jquery === i am trying to create a post using ajax and jquery.. But it ain't working. it just refreshes the current page . nothing else . Here is what i am doing <form name="update_text_post" action="" id="update_text_post" method="post"> <textarea name="textbox" class="textbox" maxlength="600"></textarea> <input type="submit" name="submit" value="Update" class="update_post_submit"> </form> Here is the Jquery part : <script type="text/javascript"> (function() { $('#update_text_post').submit(function() { $.ajax({ type: "POST", url: "post_ajax2.php", data: dataString, cache: false, success: function(html) { $("#wallwrap").prepend(html); close_box(); $('#update_text_post').resetForm(); } }); }); }); function afterSuccess() { $('#update_text_post').resetForm(); // reset form close_box(); } </script> i dont know what i'm doing wrong . please help . Post_ajax2.php has some MYSQL operations and some html .
0
[ 2, 1600, 21, 678, 568, 20624, 17, 487, 8190, 93, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 678, 568, 20624, 17, 487, 8190, 93, 9, 9, 47, 32, 21, 108, 22, 38, 638, 9, 32, 114, 24905, 160, 14, 866, 2478, 13, 9, 626, 962, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Setting foreground of one specific textblockelement in a listbox - wp7 === I've got a listbox, which ive bound to an array of strings. The listbox contains a textblock, which has the text of a string in the array. I want to change the text of one of those (it may vary which one): <ListBox x:Name="listBox" ItemsSource="{Binding Options}" ScrollViewer.VerticalScrollBarVisibility="Hidden" Width="400" Height="500" Margin="0,200,0,0" HorizontalAlignment="Center" HorizontalContentAlignment="Center" SelectionChanged="ListBox_SelectionChanged" Loaded="listBox_Loaded"> <ListBox.ItemTemplate> <DataTemplate> <ListBoxItem> <Grid Height="75" Width="400" HorizontalAlignment="Center" > <TextBlock HorizontalAlignment="Center" Text="{Binding}" Style="{StaticResource SortingOptions}" /> </Grid> </ListBoxItem> </DataTemplate> </ListBox.ItemTemplate> </ListBox> I just cant seem to get hold of the textblocks, so i can change the foreground on the right one. Does anyone know how i can achieve this? Thanks
0
[ 2, 2697, 26, 62, 8810, 16, 53, 1903, 1854, 12048, 27567, 19, 21, 968, 5309, 13, 8, 13, 13790, 465, 800, 3726, 3726, 31, 22, 195, 330, 21, 968, 5309, 15, 56, 5568, 4138, 20, 40, 7718, 16, 7887, 9, 14, 968, 5309, 1588, 21, 1854,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iText - Add Table To Header === I'm creating a pdf document using iText and Java where in the data fetched from database is to be entered in the pdf document row-wise. What I want to do is add the Headers every new page of the pdf document. I'm able to add headers and footers. However, I'm unable to add a Table to the Header. Can someone please help in this direction? Thanks in advance. Regards, Shreyas.
0
[ 2, 31, 11969, 13, 8, 3547, 859, 20, 157, 106, 800, 3726, 3726, 31, 22, 79, 2936, 21, 13, 11124, 4492, 568, 31, 11969, 17, 8247, 113, 19, 14, 1054, 13, 28998, 37, 6018, 25, 20, 44, 1297, 19, 14, 13, 11124, 4492, 3131, 8, 10474,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pass value from Textinput to Controller file === I am currently trying to put together a simple Illustrator plugin, and coming from a design background this is proving to be quite a task, I have experience with JS, but not with Flex. What I want to do is to have a panel in Illustrator, with an input field and a button. You type something in the input and press the button and a text frame with the desired text is added to the canvas. But how do I pass the value from a mx:Textinput to the Controller.as file? This is a n00b question, I know - but I couldn't find an answer on the interwebs. This is my main.mxml file: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" historyManagementEnabled="false"> <mx:Script> <![CDATA[ private var c:Controller = new Controller(); ]]> </mx:Script> <mx:VBox height="100%" width="100%" verticalAlign="middle" horizontalAlign="center"> <mx:Label text="myVariable"></mx:Label> <mx:TextInput name="TextValue"/> // I want the text value to be passed to the Controller class so I can pass it on to my JSX function <mx:Button label="Run" click="c.run()"/> </mx:VBox> </mx:Application> And this is my Controller.as file: package { import flash.external.HostObject; public class Controller { [ Embed (source="myScript.jsx" , mimeType="application/octet-stream" )] private static var myScriptClass:Class; public function run():void { var jsxInterface:HostObject = HostObject.getRoot(HostObject.extensions[0]); jsxInterface.eval( new myScriptClass ().toString()); //calling from AS to JSX jsxInterface.myJSXFunction (myVariable); //This is where I want the value to be passed to } } }
0
[ 2, 1477, 1923, 37, 1854, 108, 4881, 20, 9919, 3893, 800, 3726, 3726, 31, 589, 871, 749, 20, 442, 429, 21, 1935, 13805, 10922, 108, 15, 17, 880, 37, 21, 704, 2395, 48, 25, 15333, 20, 44, 1450, 21, 3005, 15, 31, 57, 1496, 29, 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...
Drupal form ajax executes wrong callback function === I have a form with two buttons. One traditional and one using ajax: function taxonomy_pivot_user_form(){ $form['submit_button'] = array( '#type' => 'submit', '#value' => t('Process'), '#ajax' => array( 'callback' => 'taxonomy_privot_ajax_callback', 'wrapper' => 'replace_area', ), ); $form['excel_export'] = array( '#type' => 'image_button', '#src' => drupal_get_path('module', "taxonomy_pivot") . '/images/excel.png', '#value' => t('Excel Export'), '#submit' => array('taxonomy_privot_excel_callback'), //'#executes_submit_callback' => false, ); return $form; } If I have just the first button the method "taxonomy_privot_ajax_callback" is called properly and the correct result is returned. If the second button is added, the second one works as desired, but the first one seems to call also the #submit of the second button. function taxonomy_privot_excel_callback($form, $form_state){ return taxonomy_privot_ajax_callback($form, $form_state, "excel"); } function taxonomy_privot_ajax_callback($form, $form_state, $op = "table"){ dd($op); } $op has the value "excel" for both buttons. Can you help me and show what is wrong with my form definition?
2
[ 2, 15708, 6720, 505, 20624, 15644, 18, 1389, 645, 1958, 1990, 800, 3726, 3726, 31, 57, 21, 505, 29, 81, 12861, 9, 53, 1361, 17, 53, 568, 20624, 45, 1990, 26802, 1, 2159, 23061, 1, 16704, 1, 4190, 5, 6, 1, 5579, 4190, 2558, 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...
Yii framework CGridView in 3rd. party application === I'm trying to implement CGridView in my website which only uses Yii framework without creating Yii application. So here is the content of index.php: require_once(dirname(__FILE__).'/../framework/yii.php'); $dbConf = array( 'components'=>array( 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=yii_tour', 'emulatePrepare' => true, 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', ), ) ); Yii::createWebApplication($dbConf); Yii::import('zii.widgets.grid.*'); $message = new Message(); $dataProvider = new CActiveDataProvider($message); $grid = new CGridView(); $grid->dataProvider = $dataProvider; $grid->run(); This code works without any errors. The only problem is that it only outputs "Total 10 result(s)." and that's it. I can't see the grid. I checked in html and this is what I got: <div> <div class="summary">Total 10 result(s).</div> <table class="items"> <thead> <tr> </tr> </thead> <tbody> <tr class="odd"></tr> <tr class="even"></tr> <tr class="odd"></tr> <tr class="even"></tr> <tr class="odd"></tr> <tr class="even"></tr> <tr class="odd"></tr> <tr class="even"></tr> <tr class="odd"></tr> <tr class="even"></tr> </tbody> </table> <div class="keys" style="display:none" title="/democms/grid.php"><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span><span>10</span></div> </div> I guess I'm missing something important here. Please help!
0
[ 2, 7679, 49, 6596, 272, 16375, 4725, 19, 203, 897, 9, 346, 3010, 800, 3726, 3726, 31, 22, 79, 749, 20, 8713, 272, 16375, 4725, 19, 51, 2271, 56, 104, 2027, 7679, 49, 6596, 366, 2936, 7679, 49, 3010, 9, 86, 235, 25, 14, 2331, 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...
Binding to a collection of CheckboxFor === I'm trying to implement a permission screen in which a user can be given a particular permission on a particular screen. For this I'm generating a collection of Checkboxfor, bound to a collection of bool properties. But when I submit the form, I'm either getting all bool properties true or all false, depending on whether I initialized these properties as true or false in the viewmodel constructor. Here is the code for the ViewModel: public class MyViewModel { public MyModel Model { get; set; } public IEnumerable<ScreenType> Screens { get; set; } public IEnumerable<SecurityType> SecurityTypes { get; set; } public List<PermissionType> Permissions { get; set; } public MyViewModel() { LoadScreens(); LoadSecurityTypes(); LoadPermissions(); } public void LoadPermissions() { Permissions = new List<PermissionType>(); foreach (var screen in Screens) { foreach (var securityType in SecurityTypes) { Permissions.Add( new PermissionType { PermissionId= Guid.NewGuid(), ScreenId= screen.Id, SecurityId = securityType.Id, IsAllowed = false }); } } } } Here is the code my the view: @using (Ajax.BeginForm("Create", "Role", null, new AjaxOptions { UpdateTargetId = "addStatus", InsertionMode = InsertionMode.Replace, OnSuccess = "onFormPostSuccess" }, new { @id = "AddForm" })) { <div> <span><label>Screen</label></span> @foreach (var security in Model.SecurityTypes) { <span><label>@security.Name</label></span> } <br /> @foreach (var screen in Model.Screens) { <span>@screen.Name</span> foreach (var security in Model.SecurityTypes) { <span>@Html.CheckBoxFor(m => m.Permissions.Where(s => s.SecurityId == security.Id && s.ScreenId == screen.Id).Single().IsAllowed, new { @id = HtmlHelper.GenerateIdFromName("Create" + screen.Name + security.Name) })</span> } <br /> } </div> <div> <span> <input type="image" src="/content/images/submit_button.png" value="submit" /> </span> </div> <div> <span id="addStatus" class="submitStatus"></span> </div> } Here's the code for the Create actionmethod in Controller: [Authorize] [HttpPost] public JsonResult Create(MyViewModel viewModel) { if ( ModelState.IsValid) { if (service.AddRole(viewModel)) { return Json("Role Added !"); } return Json("Role exists !"); } return Json("Please correct errors"); } When I check the viewModel in the Create actionmethod, all the IsAllowed properties are false. As were initialized in the viewmodel contructor. There is no effect of checking/unchecking Checkboxes from the view. Am I missing something?
0
[ 2, 8728, 20, 21, 1206, 16, 2631, 5309, 1106, 800, 3726, 3726, 31, 22, 79, 749, 20, 8713, 21, 5572, 2324, 19, 56, 21, 4155, 92, 44, 504, 21, 1498, 5572, 27, 21, 1498, 2324, 9, 26, 48, 31, 22, 79, 13500, 21, 1206, 16, 2631, 53...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ios camera out of focus === I use AVFoundation to make consecutive shots. Some of them are out of the focus, even though I use the mode AVCaptureFocusModeContinuousAutoFocus. It seems that captureStillImageAsynchronouslyFromConnection makes shot while camera is still focusing. Just before make shot I check if AVCaptureDevice.adjustingFocus is true, but it always false .. How can I find out the proper time to make shot? Or how can I know when camera focus was adjusted?
0
[ 2, 13, 7760, 3336, 70, 16, 1776, 800, 3726, 3726, 31, 275, 14026, 12235, 857, 20, 233, 4195, 7280, 9, 109, 16, 105, 50, 70, 16, 14, 1776, 15, 166, 362, 31, 275, 14, 3740, 14026, 4666, 6418, 23371, 15570, 13391, 9627, 18042, 23371,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Fragment Replace With ViewPager in ActionBar Tab === I have ActionBar tabs with view pager feature. My problem is in these tabs, I can not replace fragments. I use the code below to replace fragments but it does not replace, the main fragment is remained. In addition, in other tabs also the second fragment exists. My TabListener is also below the replacement of fragments. private void addFragment(Fragment fragment, boolean addToBackStack, int transition) { FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.details_container, fragment); fragmentTransaction.setTransition(transition); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); } -------- public static class TabsAdapter extends FragmentPagerAdapter implements ViewPager.OnPageChangeListener, ActionBar.TabListener { private final Context mContext; private final ActionBar mBar; private final ViewPager mViewPager; private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>(); static final class TabInfo { private final Class<?> clss; private final Bundle args; TabInfo(Class<?> _class, Bundle _args) { clss = _class; args = _args; } } public TabsAdapter(FragmentActivity activity, ActionBar bar, ViewPager pager) { super(activity.getSupportFragmentManager()); mContext = activity; mBar = bar; mViewPager = pager; mViewPager.setAdapter(this); mViewPager.setOnPageChangeListener(this); } public void addTab(ActionBar.Tab tab, Class<? extends Fragment> clss, Bundle args) { TabInfo info = new TabInfo(clss, args); tab.setTag(info); tab.setTabListener(this); mTabs.add(info); mBar.addTab(tab); notifyDataSetChanged(); } @Override public int getCount() { return mTabs.size(); } @Override public Fragment getItem(int position) { TabInfo info = mTabs.get(position); return Fragment.instantiate(mContext, info.clss.getName(), info.args); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { mBar.setSelectedNavigationItem(position); } @Override public void onPageScrollStateChanged(int state) { } @Override public void onTabSelected(Tab tab, FragmentTransaction ft) { Object tag = tab.getTag(); for (int i=0; i<mTabs.size(); i++) { if (mTabs.get(i) == tag) { mViewPager.setCurrentItem(i); } } } @Override public void onTabUnselected(Tab tab, FragmentTransaction ft) { } @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { } }
0
[ 2, 14847, 3934, 29, 1418, 6486, 139, 19, 1028, 1850, 6523, 800, 3726, 3726, 31, 57, 1028, 1850, 6523, 18, 29, 1418, 2478, 139, 1580, 9, 51, 1448, 25, 19, 158, 6523, 18, 15, 31, 92, 52, 3934, 10837, 9, 31, 275, 14, 1797, 1021, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Need to add a comma between array items === I have an array of words that gets shuffled into paragraphs using jQuery. I'm trying to add some commas "," in between them. Ideally i need a single comma added to every 4th word but this is beyond my modest jQuery skills. This is my code: $("#generatebutt").click(function() { var dumpStr = ""; var numberOfWords = $('#length').val(); var numberpara = $('#numberpara').val(); for (var i = 0; i < numberpara; i++) { Shuffle(melbArray); for (var j = 0; j < numberOfWords; j++) { var theWord = melbArray[j]; dumpStr += theWord + " "; } dumpStr = dumpStr.trim(); dumpStr += ".<br/><br/>"; } $("#dump").html(dumpStr); }); Really hope you can help!
0
[ 2, 376, 20, 3547, 21, 11951, 58, 128, 7718, 3755, 800, 3726, 3726, 31, 57, 40, 7718, 16, 715, 30, 3049, 21444, 77, 20599, 18, 568, 487, 8190, 93, 9, 31, 22, 79, 749, 20, 3547, 109, 11951, 472, 13, 7, 15, 7, 19, 128, 105, 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...
INSERT ... ON DUPLICATE KEY -- how to do this on a non primary key? === I have the the following problem. I have a table with columns like `id`, `track_id`, `artist_id` and `title`. The only unique key is the primary key, `id`, which is an auto-increment int. The `track_id` is not unique. So the situation arises where I need to update `title` for a record(s) with a specific `track_id`. If no such record exists, a new one should be created. I can't use REPLACE INTO or INSERT...ON DUPLICATE KEY because these operate off of unique or primary keys. I also cannot use multiple queries because the system this is going into requires these type of actions to be completed in a single query. That query can be as complicated as necessary, but it all must reside in one query. How can this be done?
0
[ 2, 14692, 13, 9, 9, 9, 27, 19429, 1246, 13, 8, 8, 184, 20, 107, 48, 27, 21, 538, 1256, 1246, 60, 800, 3726, 3726, 31, 57, 14, 14, 249, 1448, 9, 31, 57, 21, 859, 29, 7498, 101, 13, 1, 1340, 1, 15, 13, 1, 4792, 1, 1340, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Intercept set methods with Spring AOP to check values === Sorry my bad english. I'm developing a system that will send XML data to another system. To create the XML I'm using XStream, so I have created the classes that will be serialized to XML. But I need to check the size of attributes in the classes. I thought to do that in set() methods in the classes. But write a similar code on every class, in every set() method, is not good. So I thought I can use Spring AOP to do that. I'm new to AOP and I just know that I can do that using it, but I don't know how. Someone can help me? Thanks a lot.
0
[ 2, 18324, 309, 3195, 29, 1573, 21, 2594, 20, 2631, 4070, 800, 3726, 3726, 1875, 51, 896, 486, 9, 31, 22, 79, 3561, 21, 329, 30, 129, 2660, 23504, 1054, 20, 226, 329, 9, 20, 1600, 14, 23504, 31, 22, 79, 568, 993, 11260, 15, 86,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
nGinx non-www to www redirect === I have been working with apache for years and now wanted to move to nGinx keeping in view the performance everyone on internet seems to be talking about. But I its very frustrating for me for not being able to rewrite a non-www url to www i.e. example.com to www.example.com I have referred to all the posts on StackOverflow and have tried their configurations. Somehow the system does not seem to work. I have wasted more than 2 hours in this and need help from you. **My nGinx version is 1.2.1**. This was 15sec work in Apache. I have somehow started missing apache.
2
[ 2, 13, 2723, 108, 396, 538, 8, 6483, 20, 13, 6483, 302, 14706, 800, 3726, 3726, 31, 57, 74, 638, 29, 17140, 26, 122, 17, 130, 417, 20, 780, 20, 13, 2723, 108, 396, 2882, 19, 1418, 14, 956, 1266, 27, 2620, 2206, 20, 44, 1582, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 3 asp.NET access resources from controller === I'm using ASP.NET MVC3. I declared resources strings in a resource file Order.resx in App_GlobalResources and I need to access to those strings inside my controller action. The Resource namespace is not recognized as in the views.
0
[ 2, 307, 8990, 203, 28, 306, 9, 2328, 1381, 2566, 37, 9919, 800, 3726, 3726, 31, 22, 79, 568, 28, 306, 9, 2328, 307, 8990, 240, 9, 31, 2482, 2566, 7887, 19, 21, 6577, 3893, 389, 9, 99, 18, 396, 19, 4865, 1, 26763, 99, 12097, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Pivot table with Google Script === I use Script in Google spreadsheet and it is very great. I had a problem. I tried to create (from a piece of data already loaded) to create a Pivot Report .. no problem with the menu selection in the spreadsheet (Menu "date" -> "Pivot Report") ... I could not find a way to create a script that I can do this automatically. How to create a pivot table in Google Spreadsheet Script? And 'possible?
0
[ 2, 20670, 859, 29, 8144, 3884, 800, 3726, 3726, 31, 275, 3884, 19, 8144, 1789, 17627, 17, 32, 25, 253, 374, 9, 31, 41, 21, 1448, 9, 31, 794, 20, 1600, 13, 5, 2665, 21, 1855, 16, 1054, 614, 8572, 6, 20, 1600, 21, 20670, 1330, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...