Posts

Showing posts from March, 2012

api - Return data using a marker in Google Maps v3 -

Is it possible that street address, province, zip code (postal code) by using a marker in Google Maps, Come back to the city and country? V3? Sometimes data is not returned using formatted_address. Is there any way I can do something special? Such as return [1]. Whistle, returns [1]. Country, Returns [1]. Address ... Yes. I wrote a function that reads the components of geographic results. Here is a complete example Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; # Map-canvas {width: 500px; Height: 400 pixels; } & Lt; / Style & gt; & Lt; Script type = "text / javascript" src = "http://maps.googleapis.com/maps/api/js?sensor=false" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function init () {var center = new google.maps.LatLng (50.845464, 4.3571121); // Brussels classocoder; Geocodar = new google.maps.Geocoder (); Var map = new google.maps.Map (document.getElementByI...

oracle - NLS_NCHAR_CHARACTERSET explanation -

Should I start I Oracle user'm not an expert so I Basics undestanding some problems: D. Our application is an MVC one with Nhibernate DB connection. When we try to save characters such as 'Ѽó' in the NRHARAR area, then give them a question mark '?' As is saved. To correct this we changed the database to a different charset. Our Anels_detabes_prametrs to establish here: Anels_elaanajian American Anelsdayreria USA Anelskyuararansi $ Anels_aisaisiuaruaransi USA Anels_anaaraanaiaaraaraactors., Anels_caraketrsiti EE 8 ISO 885 9 P 2 Anelskalender Gregorian NLS_DATE_FORMAT DD- Mon. -arar NLS_DATE_LANGUAGE American NLS_SORT binary NLS_TIME_FORMAT HH.MI.SSXFF AM NLS_TIMESTAMP_FORMAT DD- MON-RR HH.MI.SSXFF AM NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR NLS_TIMESTAMP_TZ_FORMAT DD-Mon-RR HH.MI.SSXFF AM TZR NLS_DUAL_CURRENCY $ NLS_COMP Binary NLS_LENGTH_SEMANTICS Byte NLS_NCHAR_CONV_EXCP Wrong NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 10.2.0.4.0 Originally NLS_CHA...

python - All pairs of numbers between 2 arrays -

I'm trying to get all the pairs between two arrays successfully using no numpy what do I really need An external product where the coefficient will be multiplied rather than inserted into an array, i.e.: a = np.array ([1, 2]) b = np.array ([ 3, 4]) NP. Funk (A, B)> and gt; & Gt; [[[1,3], [1,4]] [[2,3], [2,4]] I'm trying to np.meshgrid ( A, b) but I do not expect output. You also have a mashgrid: & gt; & Gt; & Gt; Np.transpose (np.meshgrid (a, b)) array ([[[1, 3], [1, 4]], [[2, 3], [2, 4]]])

Java how to compare an element of an array with all the other elements of the same array -

Assume that we have the integer element x [N]. How can I know that for example the X [1] element is equal to or equal to all the other elements of the same array? I have used a four-loop but it does not work because I want to check whether any other element is more than an element to do something else. If I use it for this, instead, if the element is more than one of the other elements, then it does something, and this is wrong for my purposes. Please help me, can you help me? Here's an example of me: for (int i = 0; i & lt; num & amp; i! = J; i ++) {if (ElementiInseriti [j] & gt; = elementiInseriti [i]) do something; }} Use a boolean variable Boolean doSomething = true; For (Int I = 0; i & lt; num & amp;; some; i ++) {if (elementiInseriti [j] & lt; elementiInseriti [i]) {doSomething = false; }} If (doSomething) // do something If elementiInseriti [j] is less than any of the other elements, the flag will lie, and you do not have anythi...

json - Is it possible for the adapter to send two items at a time to the dropdownlistview in android -

When I click on an item in the dropdown list view of Android, I want to display the ID of the related item. {"Id": "1", "name": "drink"}, {"id": "2", "name": "bread"}, {"id": "3" "Names": "Cereal"}, {"id": "4", "name": "cheese"}, {"id": "5", "name": "citrus fruit"}]}

backbone.js - Customizing backbone models to work with urls like /documents/6/editor -

It is possible to override the backbone model's URL method to enter an ID between the URL string. I do not want to get this from documents / 6 , but it documents / 6 / editor and similiary update documents / 6 / editor Currently insisting on adding vertebra bone ID at the end of the url string. I tried urlRoot: function () {return "/ documents" + this.id + "/ editor"; } Although this works to get a model from the server, it fails on the update. It seems that the URL / documents / 6 / editor / 6 and not / document overriding replaces the prefix of your URL and later on Try var M = backbone.Model.extend ({urlRoot: '/ documents', url: function () {var base = backbone.Model.prototype.url. Call (this ); If (this innovation) returns, return on the basis + '/ editor';}}); and a demo

postgresql - Is it possible to get a function result with columns which are not in the group by (SQL)? -

I am trying to get the final registration date of a course, but I id Thar Max of the record is a function, so I should use the group from id , which I do not want, because the result is very different (only one record per ID per every record). What's the way to manage a query like this ?: SELECT id, MAX (registration_date) as a registration form; Because it returns an error and I have to do this to avoid it: SELECT id, MAX (registration_date) AS in the form of registration Group ID from registration ID; And I do not want the result of the last one. You can use the window function for: SELECT id FROM (SELECT id, RANK) (override registration_dated DESC from the course of RCom) WHERE rk = 1

cocoa - Swift cocoapods with custom workspace -

Cunts start getting this job I want this file structure: myApp - .git - myApp.xcworkspace - myApp / myApp - myApp / myAppTests - myApp / myApp.xcodeproj - Podfile - Podfile.lock - Pod / - Pods / Pods.xcodeproj - ... This looks a bit neat. Podfile content: xcodeproj 'myApp /myApp.xcodeproj' workspace 'myApp.xcworkspace' platform: iOS, '7.0' source 'https://github.com /CocoaPods/Specs.git 'pod' Facebook-iOS-SDK ',' ~ & gt; 3.19 ' I run Pod installs in the root wall - I get a notification on the exode that some other applications modified my workspace: if I press the current ("Pod Install" modified workspace) I do not have a Foads project in my workspace. If I want to return I get the dir pod project in my root, but when I #import & lt; FacebookSDK / FacebookSDK.h & gt; Your Bridging-Header.h file - this can not solve the path to FacebookSDK files. Any thoughts that I am missing? Is the...

SQL Server Paging query using a column alias -

I'm trying to create a question that I can then use for a page system here In the form of a query, it stands as the Phone Number, Ro_Number () as the SELECT SLCustomerAccountID, Customer Account Number, Customer Rights Name, (Main Telephone Area Code + main telephone subscriber number) ( Customer order by ACCnet) as the Randex from the SLC customer The account is where the customer 'account' name and the line index between 10 and 30 orders by CustomerAccountName with this query errors invalid column name 'RowIndex' Because I'm trying to use the other name, but I can use this to set this so that I have data in the RowIndex Here's the query where there is a return without clauses ID1 ID2 name number line number __________________________________________ | 12374927 | 00010014 | Some names ****** | 1 | | 51744 | 6631 | Same name ****** | 2 | Text after the You do not use another name in where (Only in ORDER BY ) But if you can access f...

php - Composer autoloading fails for PHPUnit -

Composers ran into my local machine as well as Travis CI ran into problems using the psr-4 autoloading feature and PHPUnit But there are problems. Unit tests are not able to receive my classes, while doing common scripts . Of course there is something wrong with any configuration, but I did not know what I did. Thanks in advance for your help. Here are my projects file structure: Public src / http / urlhelper. Php lib.php Test Blackberry / Http / urlhelper.test.php lib.test.php bootstrap. Php testcase.php .travis.yml Composer.Jason init.php phpunit.xml Here's my musician. Jason looks like this: PHPUnit configuration defines a bootstrap , In which a

ios - Can't present view controller in a UIPopoverController -

I have a number of container ideas in a navigation controller. Now I'm trying to use the UIPopoverController to display a scene. This view was already presented to the user first - it was in a container view embedded in a navigation controller If I try to render in a popover then tried to present an active controller to the application but the scene is not active . Is it just anywhere in the navigation controller stack, does it mean that you can present each scene only once? Edit: The structure of this problem looks like the following: See Controller> Container A (VC1, VC2, VC3)> Container B (VC2, VC4) should now be offered as a popup on container B VC3, an incident should contain VC2 in Container B (C # Event) Container B should present a popup -> The app crashes and I get the above error message. Now I tried to present popup directly from VC2. It seems to work, maybe this is a problem because I am reusing pop-up from Container B. I see it. No...

linux - awk system syntax throwing error -

I am trying to transfer all of my files to a new directory in my directory in my phone and the same Phone X.Tech in time. E.g. 1.txt, 2.txt, jim.txt Become: in phone1.txt directory phone1 Phone2.txt directory phone2 phone3.txt in directory3 in phone3 I am a newbie for awk, but I am successful in creating the directory, but I can not get the right to change the name . I have tried: ls | Xargs -n1 | Awk '{i ++; System ("MKDIR Phone" i); The system ("mv" $ 0 "phone" i ".txt -t phone" I)} ' many of which are errors: Mv: stat can not "call" i ': no ​​such file or directory and: ls | Xargs -n1 | Awk 'i ++; System ("mkdir phone" i); System ("mv" $ 0 "phone" i "/phone"i".txt")} ' Error: awk: 1: Unexpected character 0xe2 xargs: / bin / echo: ends by signal 13 Can someone help me eliminate it? TIA! If you want to increase it by incre...

javascript - amcharts makechart not working -

I am trying to create an amiratars serial chart on my Durandal single page application. This chart was working fine on Chrome browser but it is not working on IE. Can you please help me in this regard. Error while using Amcharts. The Macchart () method does not support the object in this object in IE.

Ember.js multiple views for same controller OR wizard like routes; how to? -

Click Next and go to the second page and until it reaches the final page. Here, he clicks on the end and all his input is stored using an amber model There are two other such questions: Then I took the approach described in the above links. A template with one path, one controller, lots of {{# if}} so that I only show the fields of the current phase. I think I can improve it by partial use and so each stage will have its own template. The question is, is this the only / best way? Has anyone detected a better way of implementing this kind of flow? If you make each wizard page a component and then for each component as a template parameter Pass the model, you get a pretty good workflow URL is stable (continuously adding junk to the end of the situation); It is easy to leave the user in the first step whenever they enter the path (such as manually inputing the URL or, more importantly, eliminating the wizard and hitting the browser's back button); And yo...

c# - Intercept webapi json formatting errors -

I exception occurs when you have a way to send intercept distorted json a WebAPI endpoint want, so that I can return to resist a meaningful error codes as only 500 (for example, "go to your broken JSON fix or hell") are You can create your custom accreditation filter attribute by getting: Public class ValidationFilterAttribute: ActionFilterAttribute {Public Override Zero OnActionExecuting (HttpActionContext actionContext) {if (actionContext.ModelState. Iframe} {actionContext.Response = actionContext .equest .CreateErrorResponse (HttpStatusCode.BadRequest, actionContext.ModelState); }}} Now, you are either with it can decorate your actions: [HttpGet] [ValidationFilter ()] public string DoSomethingCool () or it through your config : config.Filters.Add (new ValidationFilterAttribute ());

cordova - Show native toast in Phonegap Application in android -

How to show indigenous toast in Phonegap version 3.5 on Android We make any class in Android application to show toast in PhoneGap application window.plugins.toast.showLongBottom ("server error", function (a) { Console.log ('toast success:' + a)}, function (b) {console.log ('toast error:' + b)});

sql - RETURNING clause for PostgreSQL UPDATE with PHP/PDO -

I execute a simple postgresql update: Update data SET gender = TMP WHERE data from bottom (tmp .champ2) .mail = tmp.champs1 and (data is generated or data. Gender = '') and not TMP.chips2 and TMP.chips2! Returning gender But how do I get this result with PhD, PDO? I try to do something like this: echo $ requete = "update data" $ value. "TMP WHERE data from" = less (tmp.champs ". $ Num.") .mail = tmp champs ". $ Email "and (Data is". $ Value. "Tap or data. $$ Value." = '') And tmp.champs is not ". $ Num." And neither tmp.champs "$ Num." = '' Returning ''. $ Value; $ Db-> Executive ($ requete); $ Db-> Launch (PDO :: FETCH_NUM); $ Row echo [0]; The correct number of updated rows does not return. According to: PDO: exec () executes a SQL statement in a function call, returns the number of rows affected by the statement. Your current code is $ Db-...

javascript - Start Pikaday calendar closed -

The picade calendar is opened when the page is loaded, there are some options for it to stop and after triggering triggers to open ? When you generate the Pikaday element, it is not shown by default This is triggered when the user generates the focus event on the derived input field. If you provide some sample code, we can help you, but depending on what you ask, you feel that you can see examples from pikaday.jquery-plugin are using it . This example shows the calendar when the page is loading because it adheres to js : var $ datepicker = $ ('# datepicker'). Pikaday ({firstday: 1, miniaturized: new date ('2000-01-01'), maximum date: new date ('2020-12-31'), year range: [20002020]}); // series first datepicker for some methods, jQuery style! $ Datepicker.pikaday ('show') pikaday ('nextMonth'). If you take a look at this code, then you can see that piceday is not shown by default, the function that will clear the calend...

c# - Reference to Razor Render Script -

मैंने वेब MVC 4 (.net 4.0) प्रोजेक्ट खोला है , और मैंने पाया है कि BundleConfig अनुपलब्ध है, इसलिए मैंने इसे बनाया है, और मैंने भी सिस्टम। वेब। ऑप्टीमाइजेशन जोड़ लिया है, और उसके बाद सब कुछ काम कर रहा था ठीक है, को छोड़कर: दृश्य में, जब मैं इस तरह से स्क्रिप्ट को प्रस्तुत करने का प्रयास करता हूं: @ scripts.Render ("~ / bundles / jquery") मुझे त्रुटि मिलती है, इसलिए मुझे इस तरह से प्रस्तुति देना होगा: @ System.Web.Optimization.Scripts.Render ("~ / bundles / jquery") मैं पूरे संदर्भ को कैसे बचा सकता हूं? अपने में देखें, ऑप्टिमाइज़ेशन नेमस्पेस में शामिल करें और बंडल को रेंडर करें: @ system.Web.Optimization @ scripts.Render ("~ / bundles / jquery") का प्रयोग करते हुए

javascript - Use array instead of array of parameters -

इस सवाल का पहले से ही एक उत्तर है: 7 जवाब मैं कैंची का उपयोग करने की आवश्यकता है मॉड्यूल पीडीएफ में शामिल होने के लिए ... मेरे पास एक मर्ज करने के लिए फ़ाइलों की एक चर संख्या है, ताकि कोड दिखता है: var files = [कैंची ("a.pdf" ), कैंची ("बीपीडीएफ")]; कैंची.जोइंड (***) .डिफ़लेट ()। पीडीएफ स्ट्रीम ()। पाइप (fs.createWriteStream (आउटपुट)); कैंची उम्मीद प्रत्येक फ़ाइल के लिए एक पैरामीटर: scissors.join (कैंची ( "a.pdf"), कैंची ( "b.pdf") , आदि तो मैं कैसे कर सकता हूं? आप कर सकते हैं । उपयोग: scissors.join.apply (कैंची, फ़ाइलें) .deflate () pdfStream () पाइप (धारा);

regex - htaccess redirect to HTTPS except a few urls -

I am new to htaccess's redirect content, but want to special smth - and I do not know how to suggest Has not been known and if it is still possible or not. I have this in my .htaccess file: RewriteCond% {HTTPS} close RewriteRule ^ (. *) $ Https: / /% {HTTP_HOST}% { REQUEST_URI} [L, R = 301] rewrite% {HTTP_HOST}! ^ Www. (. *) RewriteRule ^ $ https: //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301] Every URL is now directed towards the HTTPS version - this Ok and it's important but now there are some exceptions. For example, these URLs have to be HTML instead of HTTPS: http://www.mywebsite.com/another/url/which has / Ho / http http://www.mywebsite.com/and_again?var=a Is it possible to solve it with HTACAC and send a reference link to me as soon as possible Or how to describe it. Edit I now have this code: rewrite% {HTTP_HOST}! ^ Www. RewriteRule ^ https:! //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301] RewriteCond% {HTTPS} RewriteCond% {closed THE_REQUE...

python - TypeError: unsupported operand type(s) for +: 'int' and 'str' even after I change the string to an integer -

I am getting an error for my program and I look around the site and now it is understood that I have tried to add a string to an integer error, but when I use the int (variablename) command, I get an error while trying to add it. This is my code that I am working on: value = input ("how many keys in that value is \ n sum:") int (value) SPC () while a == '1': If price.isdigit (): print (value, 'key') spc () yn = input ("Is this correct? \ N (y / n) Answer:") While yn! = 'Y': spc () price = input ("How much is the value in the key \ n sum:") SPC () print (value, 'key') spc () yn = input ("Is this correct? N (y / n) Answer: "SPC () Brake SPC () print (" This is not a valid key amount ") SPC () Price = input (" How much is the value in keys \ n answer: ") If you are thinking that what is SPC () def (spc): print ("") I get an error after that and there are other parts of...

c# - FluentNHibernate 1.2.0.712 FileIOException that only occurs on subsequent runs of our app -

I'm working for an application, we start the following exception from the NHibernate in Visual Studio 2014 oddly have make. Specific basis: The file or assembly could not load FluentNHibernate, version = 1.2.0.712, culture = neutral, PublicKeyToken = 8aa435e3cb308880 'or one of your dependencies. The API call abnormally exited (Exception from HRESULT: 0x800300FA (STG_E_ABNORMALAPIEXIT)) When we make a change to the server code, which causes the application to re-compile, Works. This is only happening when we first try to run our web project without the reconstruction of the project. We have made sure that the DLL is being deployed in the bin folder. We have ensured that there are references to FluentNHibernate v1.2.0.712 in the application. We know that this is the case, because the first time is working as expected. Such a code, where this is happening, looks like this: public class datacontex: IDisposable {private stationary ISessionFactory _sessionFactor...

image processing - Montage in Matlab - save and show -

जब मैं यह कोड चलाता हूं: fileFolder = fullfile (matlabroot, 'toolbox', 'छवियों', 'imdemos'); DirOutput = dir (पूर्णफ़ाइल (फाइलफ़ोल्डर, 'एटी 3_1 एम 4 _ *। टीआईएफ')); फ़ाइलनाम = {dirOutput.name} 'zImg = montage (फ़ाइलनाम,' आकार ', [2 5]); मुझे एक नए आंकड़े में असेंटेज छवि मिलती है, लेकिन मैं इसे रद्द कर सकता हूं और इसे बस में संग्रहीत कर सकता हूं। याद? इसके अलावा, मैं असेंटेज को नहीं बचा सकता। getframe का उपयोग किए बिना और क्यों मैं यह कैसे उत्पन्न कर सकता हूं क्योंकि मैं उत्पन्न आंकड़ा नहीं दिखाना चाहता? MATLAB के इमेज प्रोसेसिंग टूलबॉक्स में फ़ंक्शन केवल डिस्प्ले प्रयोजनों के लिए है और इसलिए यह केवल एक आंकड़ा दिखाता है। एकमात्र तरीका है कि आप इस आंकड़े से छवि डेटा प्राप्त करने में सक्षम होंगे, यदि आप आउटपुट के रूप में एक फ़ंक्शन के लिए एक हैंडल असाइन करते हैं (जो कि आपके मामले में zImg है), तो Getframe / cdata मुहावरे का सुझाव दिया है हालांकि, यह आपको एक सफेद सीमा प्रदान करेगा जैसा आपने देखा है। यदि आप ऐसी कोई छवि बनाना ...

mysql - SELECT unique values from table with multiple columns containing similar data -

I am trying to select a list of country codes from the country that contains 3 different There are columns. Example Raw desired + ----------- + ---------- - + ----------- + + ----------- + | Country_1 | Country_2 | Country_3 | | Countries | + ----------- + ----------- + ----------- + ----------- + | GBR | GBR | IRL | | ARG | | DEU | FRA | CHE | | Australia | | CHN | CHN | Ind | | BRA | | United States Can do it. MX | | Can do it. | Australia | JAP | Core | | CHE | | BRA | ARG | ARG | | CHN | | Knorr | SWE | Finn | | DEU | | GBR | FRA | GBR | | Finn | | IRL | IRL | IRL | | FRA | + ----------- + ----------- + ----------- + | GBR | | Ind | | IRL | | JAP | | Core | | MX | | Knorr | | SWE | | United States + ----------- + The one closest to me so far is such a query: mysql & Gt; Choose Conset (from Tbl), ',', (Countries from country to country country according to Blogger), ',', (Select country country ORDER country country), ',' TBL)); + -------...

android - No visual editing of preferences screen anymore? -

I wanted to add a settings menu to my Android app. I followed it and added "activity_settings.xml" to "res / xml /" such as descripted. But now I can not edit with the WYSIWYG editor? Why is that so? Does Google no longer support this kind of setting? How should I do this? Create a "normal" activity layout file and use it as a menu? It was found, but why not answer it: Never been a visual editor for This is an XML file of preferences which are bound to any activity on run time. I do not see anywhere in the official documents associated with you, which supports the idea of ​​the view editor. You can visualize any activity layout, but it is always different (for my understanding) I can see where you are coming from, but still have an XML layout type Is in the structure. Your best solution is to turn on your project from time to time to see the progress.

Google Tasks API not using its increased quota -

I have a Windows Phone Google Tasks app that is growing in popularity and a few months ago I realized that I I was killing 5,000 daily requests, the function courtesy of QI. I was getting 403 "delimited acceded". After the advice of several forums, I requested increase and finally 20,000 daily requests were given. However, it still seems that the 5,000 limit is stopping me, I have made two more projects to get around and my app Round Robin is among the two users to help balance the balance. I am using Oath, so I do not think I am killing anonymous boundaries. All quotas in the projects are listed as 20,000 and it is tracked, but my original project generates an error of around 5000. I have not used high usage of new projects so far. I also tried to close the API, but it did not help. Any ideas about fixing it? There was a bug in the quota increment process that prevented changes from going into effect. The bug has been fixed in the code and should be released at...

html5 - setting opacity for background image with url in css -

I am using Bootstrap with HTML5 to develop a website. I have a website header, I want to put an image in the top header of the website with some ambiguity value and some text in it also I have referred to this link and tried to apply it. I got the text but the image is not. Here's the code: HTML: & lt; Div class = "page header header" & gt; & Lt; Div class = "hbg" & gt; & Lt; / Div & gt; Hello there & lt; / Div & gt; CSS: .head {location: relative; Z-index: 1; Margin Top: 10px; Height: 170px; } .head.hbg {background: url ('hbg.png'); Background-shaped: 100% 100%; Opacity: 0.3; Z-index: -1; } What's the problem here? Add you status: absolute; Top: 0; Left: 0; HBG and width and reach a height of 100%, so it spreads in all original containers :) .head {location: relative; Z-index: 1; Margin-top: 10px; Height: 170px; } .head .hbg {status: absolute; Top: 0 pixels; Left: 0 pixels; Background: U...

css - Overlap element on hover -

I want a bootstrap panel header to expand on the hover, but not below the next panel as shown in this bedle Shake should: What do I need to do when you hover over the top of the panel, instead of pushing it forward will overlap the panel body. My HTML is just Twitter Bootstrap stuff and looks like this: & lt; Div class = "panel-panel-default" & gt; & Lt; Div class = "panel-title" & gt; & Lt; Img src = "profile-pic.jpg" alt = "profile picture" /> & Lt; / Div & gt; & Lt; Div class = "panel-body" & gt; & Lt; B & gt; John Doe & lt; / B & gt; & Lt; Br / & gt; J.do@example.com & lt; Br / & gt; Sumnstreet & lt; Br / & gt; & Lt; P & gt; City & lt; / P & gt; & Lt; Br / & gt; & Lt; / Div & gt; & Lt; / Div & gt; And looks like my CSS: . Panel-Title {Height: 100px; }. Panel-Title: Hover {Height: 150px; / * This shou...

php - Why I need PDOStatement::nextRowSet with stored procedure to get result? -

I can not understand about the stored procedure of PDO and let me clarify some clarification (and perhaps my problem) the wanted. I am using SQL Server 2008 R2 with PHP 5.4 and Apache 2.2. I am calling a stored procedure with 2 parameters using PDO (with SQLSRV drivers): $ pdoStmt = $ pdo-> Prepare ('MY_STORED_PROCEDURE ?,?'); $ PdoStmt-> Bind value (1, 'MyWhill1', PDO :: param_st); $ PdoStmt-> Bind value (2, 'MyView 2', PDO :: param_st); $ PdoStmt-> Executed (); Well, here, everything works perfectly, the result of the stored procedure is called an array, so I should use fetchArray () I do this: $ result = $ pdoStmt-> fetchArray (); But the result is empty. And I do not know why, I have to call nextRowSet () several times to get results, so I do this: {$ result = $ PdoStmt-> Get All (PDO :: FETCH_ASSOC); } While ($ pdoStmt-> nextRowSet ()); Then I have my result! Yes .... The archived procedure works (when I execu...

cert authentication work with signalr in a mixed case -

I have a hub with 2 types of clients, identity cookies and C # clients The browser is called the client with the comment I can work ethereal but if I need to give an IIS signal to the customer indicator / signal then the browser client encourages the user to prove - good No. I tried var str = String.Format ("https: // {0} / cert_signalr", url.Host); M_hub = New HubConnection (str, false); IIS requires certs on / cert_signalr and adding a rewrite rule of cert_signalr -> signalr It did not work like hubconnection did not pay any attention to specifying the URL My code worked Does - I did what I did in the wrong web config & Lt; / Safety & gt; & Lt; /system.webServer> & Lt; / Location & gt;

function to initialize variables in C -

I should use a function to provide the initial value of the variable, but I do not understand that my code Why does not the init function in? In order to start A, B, C, it gives some garbage numbers. In addition, I should use a rotating function using the static declaration of variables, A, B, C, but it does not swap the variable due to its stabilization. How do i do this zero init (int number 1, int number 2, int number 3); Int main (zero) {int a, b, c; Init (a, b, c); Printf ("a =% d, b =% d, c =% d \ n", a, b, c); turn by turn (); Return 0; } Zero init (int num1, int num2, int num3) {printf ("Enter value for num1:"); Scanf ("% d", & number1); Printf ("Enter value for num2:"); Scanf ("% d", & amp; NUM2); Printf ("Enter value for num3:"); Scanf ("% d", & amp; num3); } Zero rotation (zero) {static int a, b, c; Int temporary; Temporary = a; A = b; B = C; C = temp;} Your function value . Ho...

javascript - Ajax script to store user info to the DB in Django -

अवलोकन: मेरे डीजेंगो प्रोजेक्ट में एक समाचार में पोस्ट प्रदर्शित करता है फ़ीड्स पृष्ठ, मैं चाहता हूं कि उपयोगकर्ता "चुनना" पोस्ट (जैसे Pinterest में पिन) करने में सक्षम हों। यह विचार एक "चुनना" बटन बनाने वाला है जो स्वचालित रूप से सूचनाएं संग्रह तालिका (नीचे परिभाषित मॉडल) में संग्रहीत करता है। क्लास पोस्ट (models.Model): चुनता है = मॉडल। कई टॉममैफ़ीफिल्ड (उपयोगकर्ता, के माध्यम से = 'पिक', संबंधित_नाम = 'यूज़रप्रिक्स') ... क्लास उपयोगकर्ता (मॉडल। मॉडल): ... और वर्ग चुनें (models.Model): user = models.ForeignKey (उपयोगकर्ता) पोस्ट = models.ForeignKey (पोस्ट) pick_date = models.DateTimeField ( 'तिथि चुना', डिफ़ॉल्ट = datetime.datetime.now ()) समस्या समस्या स्वचालित रूप से और सीधे जानकारी भेजने के लिए है उपयोगकर्ता को कोई भी फ़ॉर्म भरने के लिए बिना पूछे बटन को दबाकर बैकएंड पर। प्रश्न मैं समाचार फ़ीड में अजाक्स का उपयोग करना चाहता हूं HTML पृष्ठ, user.id, post.id और तारीख को प्राप्त करने के लिए जब डीबॉब की डीब की मेज...

compilation - cross compile on mac for windows -

I am creating a project using FLTK on a 2012 MacBook Pro Mac OSX 10.8.5 and from the i686-apple-darwin11-llvm-g ++ - 4.2 command line. Ideally I would like to cross the compilation without learning VS for windows, installing all dependencies etc. Compile for windows from Mac I found this and a package was downloaded, which was installed automatically. I then downloaded the source code of the example that it has worked and it only gives me a bunch of errors. By looking at the make file it refers to the directories I do not have, for example read the file supplied # ------- ------------------------- ------------------------- --------------------- * # * # C + HELLOWORLDFORMINGW 3 2 ONMACOSX * # * # Updated for # 2 Release * # * # ---- --------------------------------------------------- ------------------------ * TOOL_DIR: = /usr/local/i386-mingw32-3.4.5/bin Source: = hello_world.cpp OBJECTS_DIR: = Executable objects: = hello_world_in_cpp.exe ALL_OBJECT_FILES:. = $ (Patsubst%, $ (...

amazon web services - How to restrict user to a specific folder using AWS SDK for PHP -

I have created a script using ADS SDK for APL, which creates a folder for every customer on the signup, customers The files will be uploaded / downloaded from your own folder only. I do not want to share access keys and secrets with customers, because it gives full access to the bucket and all its files and folders. Is there a way to create folder specific access keys to limit customers to their own folders? So basically I'm after a few limited access keys, is there a workaround? Many thanks!

asp.net mvc - How to escape to use page's names like string "Index" -

I'm thinking that there is a good way to avoid using return To use something like redirectToAction ("index") and return redirect tiections (appage.exx.tostening)) > The idea of ​​getting rid of possible errors is possible. Redirect redirect ("indexx") For this, count of the counting or static class Is yoga? Thank you! PS I just found this great article There is a project that you can use. It provides strong typing for your thoughts and actions. There is also a package in it The advantage of using it is that you do not have to manage the process. Instead of using the string literally "index" you can use it as the following. This return RedirectToAction (MVC.Home.Index); // Suppose we are in Home Controller

syntax - Puppet: cron schedule - "is not a valid hour" error -

I need to schedule a cron job to run daily between 0 to 6 and 13 to 23 every 30 minutes . I tried this code: cron {"myself": make sure that & gt; Current, command = & gt; "My-cron-command", user = & gt; 'Root', bell = & gt; "0-6, 13-23", minutes = & gt; '* / 30', Environment = & gt; "MY_ENV"} this fails 0-6,13-23 is not a valid time Should I use the hour format? Do I need any other changes in the Cron Clause? If you are entering more than one value for any attributes Place them in an array list so, this time will be ['0-6', '13 -23 ']

c# - RadGrid grid columns collection has only 1 row, no name, in ItemDataBound event. Why? -

I'm trying to execute some arguments in the RadGrid1_ItemDataBound event method. (Image URL) needs to be indexed. In trying to find this column, I have tried many different ways. In all cases, the column collection of RadGrid contains 1 column with an empty name. My code is as follows: GetColumnIndexByName (RadGrid Grid, String Name) Private Ink {for (int i = 0; i & lt; grid.Column.Count ; I ++) {if (grid.Columns [i] .HeaderText.ToLower (.) Trim () == Name toLower (). Trim ()) {return i; }} Return -1; } This method is called from the above phenomenon in the name of the grid and column name string. Why is grid column collection practically empty?

java - TileMap Collision -

How do you make a proper collision with tilemap? This is my current solution: int topTileX = ((tileMap.xOffs - x) - 32 - 1) / tile.IIL_ISEAJ; Int topTileY = ((tileMap.yOffs - y) - 32 - 1) / tile.IIL_ SIZE; Int bottomTileX = ((tileMap.xOffs - x) - 1) / tile.IIL_ SIZE; Int bottomTileY = ((tileMap.yOffs - y) - 1) / tile.IIL_SISAJ; Int leftTileX = ((tileMap.xOffs - x) - 32-1) / tile.IIL_ SIZE; Int leftTileY = ((tileMap.yOffs - y) - 32-1) / tile.value_ SIZE; Int rightTileX = ((tileMap.xOffs - x) -1) / Tile IIL_ SIZE; Int rightTileY = ((tileMap.yOffs - y) -1) / tile.IIL_ SIZE; If (Keyboard.isKeyDown (Keyboard.KEY_W)) {if (! TileMap.getLayer (0) [Math.abs (topTileY + 1)] [Math.abs (topTileX)] isBlocked ()) {tileMap.yOffs ++; }} If (keyboard. Itsdown (keyboard. Kiosis) {if (! TileMap.getLayer (0) [Math.bas (below TYVY-1)] [Math.base (Tilex below)] .Bold ()) {tileMap.yOffs -; }} If (Keyboard.isKeyDown (Keyboard.KEY_D)} {if (! TileMap.getLayer (0) [Math.abs (rightTileY)] [Math.abs (righ...

Filling out PDF form from html -

I have a PDF form that I would like to fill through a website. In fact, what I am trying to accomplish is the creation of the HTML form and the reply of the form to be converted to prepaid the PDF form and then save the form on the computer. How can I go about doing this? You can use Datalogics WebAPI to populate the form. This is a lush API that will take your form and some JSON key / value pairs where the key corresponds to the name of the field. It will return a flat PDF to a full and optional alternative. The flat version will change the page content in the field so that after adding the data it can not be edited in Reader or Acrobat. The base plan is free.

uiview - How to change View clicking on a butto in UIAlertViewController -

UIAlertViewController does not switch to another view shows all my stories, but click. Address it: to alertController = UIAlertController (title: "Risposta Esatta" message: "", preferredStyle: UIAlertControllerStyle.Alert) alertController.addAction (UIAlertAction (title: "Avanti" style : UIAlertActionStylekDefault, handler: {(UIAlertAction) give secondViewController: secondViewController = secondViewController () self.presentViewController (secondViewController, animated: true, completion: zero)})) it just worked for me: @IBAction func choiceBtn (sender: UIButton) { Warning Controller = UIAlertController (Title: "Hello!", Message: "This is a warning sample ", PreferredStyle: .alert) go otherAction = UIAlertAction (title:" OK ", style: .DEFAULT) {action in println (" OK pushed! ")} Cancel Cancel ACTION = UILArtaction (title:" Cancel ", Style: .cancel) {null: ActionController (alertController,...

php - JavaScript - Submitting to database after checking -

I have made some assumptions, so it checks whether the text field is an email address, my next task when input is correct My PHP sends data to the database in the file sends Any ideas JS:.? & Lt; Script & gt; Validate function () {var x = document.forms ["reg"] ["user"]. Value; Var characters = "@"; If (x.match (characters)) {Warning ("Email address can not be in the form of USERNAME!"); }} & Lt; / Script & gt; XHTML share: So when there is no "@" in the text field, I want the data to be sent to DB.PP (). Any thoughts? Thank you You need to change two things: Change your action attribute is that the posts as the correct script: action = "db.php" You make a refund Boolean values ​​from your Javascript function; When the false form is submitted, it will be canceled: validateForm () {var x = document.forms ["reggae"] ["user"] . value; Var characters = ...

javascript - JQuery addClass to thumbnail when slide is active -

I am creating a slider functionality with scratch. I have a list of slides and the "active-slide" in the current slide There is a class. & lt; Ul class = "slide" & gt; & Lt; Li class = "active-slide" & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; / Ul & gt; Then I have a list of related thumbnails, when you click on them, the slider shows this slide. & lt; Ul class = "thumbnails" & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; / Ul & gt; All this is working properly and the slider slider changes and the class adds "Active-Slide" What I'm trying to do is listen to the "Active-Slide" category And then add a square "active-thumb...

functional programming - Erlang Towers of Hanoi -

Currently trying to implement Hanoi towers using a collection. I'm trying to use the pile in Java in the example but I'm getting -module (toh). Export ([Start / 0]). Start () - & gt; Pegs = 3, Tower A = Builder A (N), Tower B = [], Towerci = [], Move (Pegs, Tower A, Tower B, Towerier). Fill the tower A with the integer 1 with the pegs. Banatea (0) - & gt; []; CreateTowerA (N) when N & gt; 0 - & gt; [N] ++ BuildoverA (N-1). % Display the tower display (A, B, C) - & gt; Io: Format ("~ w \ t ~ w \ t ~ w ~ n", [A, B, C]). Move (Pegs, Tower A, Tower B, Towerier) - & gt; If the pegs & gt; 0 - & gt; (Tower A, Tower A, Tower B), Temp = Lists: Last (TowerA), NewTervacy = C ++ Temporary, NewTV = Lists: Sublink (Tower A, Length (TowerA) - 1), Display (Newtwire, B, Newt Sea, Move (Pegs - 1, B, Newtown, Newt Sea); When I try to run the code, I get this error. {"ends in do_boot", {undef, [{toh, begin, [INIT], [[file, "init...

for loop - Doing an animation in Java -

I'm assigning a Java for the next Saturday. It's actually going well, though I'm struggling with a block. Here I want to reveal a number of numbers in a string, one at a time. I 'Thread sleep (1000);' Trying to slow down the loop, however nothing is being displayed until the thread is finished The following is a part of the graphics class where the problem is coming I miss Public Zero Color (Graphics G) {setSize (550, 300); // It pulls all random numbers, if the user is disclosed to ans (if appears == 0) {g.setColor (Color.BLUE); G.drawString (Random Number, 20, 20); // Draw String ("string", x, y)} // This shows the user from 1 to 1 in the beginning of the game if (not manifest == 1) {for (int x = 0; x & lt; borders ; X ++) {g.setColor (Color.BLUE); G.drawString ( "+ +, 20, 20); // draw to string (" string ", x, y) {Thread. Sleep (1000);} catch (shown predefined) {Systemkoutkprint (" Error ");} Color ();} // Slo...

python - SQLite: INSERT INTO column inserts at bottom of previous column -

Rows of rows in multiple columns in one row in the most document on the SQL INSERT statement Includes inserting. There is little difference in my workflow that there is no connection between the columns of my table. I am making bulk of each column in this way: when someone is done, I take it to the next column to populate it. The problem is that I do not know how the INSERT of the second column goes to column2 data to be column1 Adding to the last line of> How do I reset the cursor position to start at the beginning of the column2 ? Screenshot of table output : code: conn = sqlite3.connect ('testDB.sqlite') C = conn.cursor () c.execute ('Create table when creating table' (column 1 text, column 2 text) ') get get (): c.execute (' table name (column1) values ​​(INSERT) INSERT '(?)', (Data_values,) c.execute ('Table Name (column2) values ​​(INSERT IN-column2) VALUES (?)', (Data_values,)) The INSERT statements insert a...

c# - Check if file exists on remote server and various drive -

We have an ASPX page that needs to be checked whether the video file is present on our video server and if the file exists Then display the link. However, our videos are not stored on C Drive, but rather on D Drive. I have tried System.IO.File.Exists (@ "http: //ourvideoserver/pcode/videofile_name.mp4") and System.IO.File .Exists (@ "\\ Our Viewer \\ D: \\ pcode \\ videofile_name.mp4") The last one was just taking a wild guess And I can not figure out how to check files on a remote server than on a different drive. How to check the remote server's D drive is the correct direction in the UNC path , Drives are represented by a dollar that is, D $ try this: System.IO.File.Exists (@ "\\ Our viewer \ d $ \ pcode \ videofile_name.mp4" )

routing - User defined routes in Rails -

There is a lot of good information about routing in the rail; I should remember something, but I can not find a good example of rail applications Which allows dynamically-defined user-specific routes. For example, my app is hosted here: www.thing.com ... and facilitates the user-generated content gives. I want to give the user an option of defining a suffix, which shares somewhat customized URLs for their content. For example, if a user 'who' generates some car information, then they want to make it available through joescars: www.thing.com/joescars They may decide later that they want to serve under carbazo: www.thing.com/carsbyjoe Can I limit whether the suffix is ​​valid Is there a way to codify this type of dynamic routing? One way to do this is to type your config / routes Add paths that say get '/: user_route' = & gt; 'Somecontroller # someaction' . You have to put it down a lot because the routes are matched from top to...

c# - How many times in a day would System.DateTime.Now.Ticks % 1000 > 1000 return true? -

नवीनीकृत एक दिन कितनी बार सिस्टम होगा दिनांकटाइम.अब। टिकटें% 1000 & gt; 1000 वापस सही है? मैं एक प्रोग्राम लिख रहा हूँ जो एक स्थिर शब्दकोश में एक घटना की घटनाओं को इकट्ठा करता है मैं एक नियमित आधार पर लगातार भंडारण करने के लिए डिक्शनरी करना चाहता हूं, लेकिन अक्सर क्योंकि प्रत्येक सदस्य में मूल्य में परिवर्तन की दर लगातार होती है। सह-कार्यकर्ता ने सिस्टम का सुझाव दिया। डेटटाइम.अब टीक एक यादृच्छिक संख्या के रूप में और उस नंबर पर एक मॉड कर। मुझे यकीन नहीं है कि यह कैसे तय होगा कि यह कितनी बार सच वापस करेगा। मेरा वर्ग: मैं एसक्यूएल 100- प्रतिदिन इश बार शब्दकोश के बारे में 1000 कुंजी के साथ 250,000,000 बार / दिन अद्यतन किया जाएगा। सार्वजनिक स्थिर वर्ग StackTraceLogger {निजी स्थिर पढ़ने के लिए ConcurrentDictionary & lt; स्ट्रिंग, इंट & gt; डेटा = नया समवर्ती एक्सटेंशन & lt; स्ट्रिंग, इंट & gt; (); सार्वजनिक स्थिर शून्य लॉग (स्टैकट्रेस सेंट) {if (Data.ContainsKey (st.ToString ())) {var val = 0; यदि (Data.TryGetValue (st.ToString (), बाहर वाल)) {var n...

assembly - Is there a command to find a character in a string in MIPS? -

i.e. If we think about an input string in the context of an array, the first element being the string [0] and the string [99] is the last. Is there any way to read each person's character, or read a character in a certain position? That is, let me have the string "abcdefg". How do I use the character 'D' so that I can compare the characters around it? (Assuming I have already accessed those characters) Loop): Load r1 to maximize r1 load to load r1 Character search for r3 loop: Compare r3 and string (r1) # it loads a character Is: lb $ t4, string ($ T1) if it is equal to the fall in the branch is equal to R2; R1 geto loop

lex - Program to remove comments -

I would like to write a program in LX which will remove comments from the input. Comments can be written in these ways: / * comment * / // comment / * then find out some sort of Code> -> Then I'll check / * and ignore the text inside. If input starts with // , then I will ignore it at the end of the line but I do not know how to implement it. Lex patterns alone can not handle nested comments, so you nest with Lex states Recollection must be handled in nature (or writing a recursive original parser). With Lex, use state stack management routine ( yy_push_state () , yy_pop_state () and yy_top_state () ) Simple example: % x BLOCKCOMMENT "/ *" {yy_push_state (BLOCKCOMMENT); } & Lt; BLOCKCOMMENT & gt; "* /" {If (yy_top_state () == Blogcomment) yy_pop_state (); Else fprintf (stderr, "error: stop comment` * /` not found in comment while \ n "); } & Lt; BLOCKCOMMENT & gt; { /* consume */ } . {Returns...

bluetooth lowenergy - android- ble device status shows connected for some seconds even after turning off the device -

I am developing a BL app which sometimes gets out of range or stops, to do so Is designed for. onClientConnectionState () method. Removes after calling. Even the device is visible in the list received from getConnectedDevices (int) . How can I add a device to an Android device? When a lost one The connection is marked: Connection interval : interval (7.5ms - 4s) between the devices 'flax' on the other 'ticks' > connection slave latency : how many communications can be left without the connection lost connection (between 0-499), cross this relationship. After the connection has been lost. As it is not officially documented how these criteria have been defined in Android, you do not know what is the difference from which you change your peripheral band and this event actually disconnected. It can be between ~ 7.5 MMS and ~ 2000. .... You can monitor the out-of-range device using only the information in onClientConnectionState () You can.

.net - How to kill localdb process after exit application -

I am developing winform application. Below the connection string of my DB; string _DatabaseFile = path. Gate directory name (application.ExecutablePath) + @ "\ database \ db.mdf"; _DatabaseConnectionParams = String.Format (@ "Data Source = (LocalBible) \ v11.0; Attach DBFilName = {0}; Integrated Security = True", _DatabaseFile); Hiring works fine But the SQL Server process continues to work after I quit my application. Which approach is good to stop SQL Server? Thank you in advance. I do not think you need to do After the last connection to this process closes, it automatically closes a few minutes.

ios - In-App Purchases Crashing App With No Internet Connection -

My in-app purchases work but if I signal and slow your iPhone Wi-Fi without the use of cellular connection or signal I'm getting this message: neither came exception 'NSInvalidArgumentException', due to the end because of the application: "invalid product identifier (zero ) ' Check the Internet connection before enabling the buy button Should I? I hope that is the easiest way. All I need is to hold no connection to StoreKit error. Update With my in-app I'm able to make purchases code some changes you can also download My app is for iOS 8 and 7, and this tutorial is for iOS 6. Maybe this is a problem. I just (zero) paymentQueue: (SKPaymentQueue *) line restoreCompletedTransactionsFailedWithError: (NSError *) error application and restore SKPaymentTransactionStateDeferred case to catch the error (Zero - : Rep didFailWithError release method to prevent an accident ) request: (a SKRequest *) request FailWithError: (NSError *) er...

database - What is the best way to validate and parse complex fields in Pentaho kettle? -

What is the best way to validate a field in a row and if it is invalid, then correct it in the correct form? The easiest example can come in the phone number field (version format -> 111-111-1111, (111) 111-1111 etc.), and ideally we validate them and standardized one form Want to say (lets say: 1111111111). One way to do this is to use the filter rows and then use regex, or we can use the data validator. But it will only tell us which data is invalid but it is not actually formatted for us. We can use the javascript revised value step to write a JSP script for this. But I'm guessing that there is a better way (or has been built in the integration I have not come), who will do these basic assumptions or? After

javascript - jQuery UI sortable w/ list padding -- cannot drop over number -

html & lt; ol id = "input- L8YFwLZvwNZ4 "class =" infinitext-lis "& gt; & Lt; li & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" नाम = "उत्तर [0 [पाठ]" शैली = "चौड़ाई: 275 पीएक्स" वर्ग = "अनंत-पाठ" & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्तर [0] [आदेश]" & gt; & Lt; / li & gt; & Lt; li वर्ग = "" & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" नाम = "उत्तर [1 [पाठ]" शैली = "चौड़ाई: 275 पीएक्स" वर्ग = "अनंत-पाठ" & gt; & Lt; इनपुट प्रकार = "छिपा हुआ" नाम = "उत्तर [1] [आदेश]" & gt; & Lt; / li & gt; ... & lt; / ol & gt; जे एस $ ('# input-l8YFwLZvwNZ4')। Sortable (); जब आप सूची में से किसी एक वस्तु को नंबर से पकड़ लेते हैं और दूसरे सूची नंबरों के ऊपर से ऊपर या नीचे खींचते हैं, तो वे स्थानांतरित नहीं होते हैं और आपको सूची को छोड़ने की अनुमति नहीं देते हैं व...

firebase - AngularFire $add—TypeError: undefined is not a function -

When I select the option of push $ add-substitute, I get this error. TypeError: There is no function on undefined scope. $ Scope.send comment (http: // localhost: 9000 / scripts / controllers / post.js: 22: 38): 10847: 21 ... Here my admin is @ post.js $ 16 scope.sendcomment = function {17 var newComment = {18 users: $ scope.currentUser , 19 lessons: $ scope.currentText 20 21}; 22 y promise = comment service. Ad (new comet); 23 promise Then (function (name) {24 console.log (name); 25}); 26}; Here is my service (problematic add function is downwards) (function (angle) {'strict use'; angular.module ('Comment'); var fireComment = $ firebase (commentRef); Return {childAdded: ('comment'); ('comment' service), (FBRLL, $ Q, $ Firebase) {var CommentRef = New FireBase (FBRR) function childAdded (limitNumber, cb) {commentRef.startAt (). Limit (limitNumber) .on ('child_added', function (snapshot) {var val = snapshot.val (); cb.call (this,...

java - glCallList with slick-util -

Image
Whenever I draw my display list my clever text does not render correctly glCallList's When Using: Without the use of GlCallList: Presenting the display list: if (dl location! = -1) {GL11.glPushMatrix (); GL11.glTranslatef (x, y, 0); GL11.glCallList (dlLocation); GL11.glPopMatrix (); } All display lists have been created by this method: Private static int createDisplayList (texture T, integer width, integer height) {int returnInt = GlGenLists (1); GlNewList (returnINT, GLNMPiLE); {T. Bund () glEnable (GL_TEXTURE_2D); GlColor4f (1, 1, 1, 1); GlBegin (GL_QUADS); {GlTexCoord2f (0, 0); GlVertex2f (0, 0); GlTexCoord2f (1, 0); GlVertex2f (width, 0); GlTexCoord2f (1, 1); GlVertex2f (width, height); GlTexCoord2f (0, 1); GlVertex2f (0, height); } Glend (); GlDisable (GL_TEXTURE_2D); } GlEndList (); Return Return} I am providing text using clever-use TrueType fonts. glNewList outside glBindTexture (In your case t.bind () / Strong> might help. G...

multithreading - How to write java thread pool programme to read content of file? -

I want to define a thread pool with 10 threads and read the contents of the file. But different threads should not read the same content (such as dividing the content into 10 pieces and reading each piece through each thread) "post-text" itemprop = "text"> OK That's what you will do, it'll be almost: Get the length of the file, divide by N. N Go to each (file_size / n) * thread_no and enter (file_size / n) bytes in buffer Read Wait for all threads to complete. Stack buffers together. (If you were a bit clever about it, then you can avoid the last step ...) But, it is doubtful that you do so Will gain momentum. Actually, I would not be surprised if you are slow in many cases. With a typical OS, I hope you get better performance by reading a file using a good one ( call from a thread) file. If you read it sequentially, then you can get data quickly from the OS disc. Indeed, many OSes are optimized for this usage-case, and us...

Eclipse Luna crashes on new project in Ubuntu -

I have some difficulty working with Eclipse Luna. I downloaded tar.gz from the eclipse site and I downloaded tar.gz for Java JDK. I took everything out and the eclipse opens up properly, but when I try to create a new project, it crashes on me I went to java -version in the terminal and tells me that I have version 1.8.0_25, so I do not think I have a problem with Java. Now, it happens if I try to make any kind of project. Eclipse opens a wizard to create a new type of a special type and then the whole app crashes. When I started to do this, I installed it under the KDE desktop. When the eclipse crashes, I get the message Java: /build/buildd/gtk2-engines-oxygen-1.4.5/src/animations/oxygencomboboxdata.cpp:87: zero oxygen :: ComboBoxData :: setButton (GtkWidget *): Condemnation '! _button._widget 'failed Therefore, I decided to move the XFC desktop around it, because oxygen is a KDE theme. I uninstalled Eclipse and reinstated it under the XFC and I have the same behavior ...