Posts

Showing posts from May, 2013

matlab - Dpll, SAT (satisfability) probl, Need DPLL Function or Procedure? -

Here's my problem, I stuck with the MAT Problems (Satisfaction) in Lab Lab Actually In the function called dpll, I saw it elsewhere but in java, can someone help me ?? Thank you It is explained in .

java - Configuring MOXy's @XmlPath with XML containing CDATA -

I am trying to map an XML document using XPath. But when the XML includes a CDATA tag, it has to be faced. Example: I am using eclipselink-2.3.0 jar to get XPath mapping in my application. And JACAB I am creating a jaxb.properties file to use this implementation, which has the following: javax.xml.bind.context.factory = org .eclipse Persistence.jaxb.JAXBContextFactory XPath works only this way, otherwise the application annotation also does not raise @XmlPath . Now while running and via XML and UnmashSherty method it throws a blank pointer error: java .lang.NullPointerException at org.eclipse.preistence oxm.record.UnmarshalRecord.startCDATA (UnmarshalRecord.java:1035) on org.eclipse.persistence.internal.oxm.record.XMLReader $ LexicalHandlerWrapper.startCDATA (XMLReader.java:226) on com.sun.org.apache.xerces. On internal.parsers.AbstractSAXParser.startCDATA com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentSca...

C# how to make the stored file to cap at 100 items? -

I am trying to create a small program that takes input from the user and stores it on file, but I cap that file on 100 elements: Suppose that the user adds 100 names and the next name the user adds will show that "the list is complete" here I The code that is so far: public form 1 () {InitializeComponent (); } Private string SongName, ArtistName; Public Zero Registry () {List & lt; Name & gt; Music list = new list & lt; Name & gt; (); // Create a list of MusicList.Add (new name (SongName = txtSongName.Text, ArtistName = txtArtistName.Text)); // Add new element in NameClass // Check if input is correct (txtSongName.TextLength & lt; 1 || txtArtistName.TextLength & lt; 1) {Info Info = new info (); Info.Show (); } Else // If the input will be stored in the correct data {// Create a file to store a data. StreamWriter FileSaving = New StreamWriter ("MusicList" is true); {String sName = MusicList [i] .songName for (Int i = 0; I & lt; ...

jquery - only every other li is being affected by simple mouseover mouseout modal window code -

I am trying to write simple code that allows feeding and feedout of specific devices when their related "notification Divides "are eliminated out I have eight catalog items and there are eight related "information divisions" when the first is hidden on li, this "information div" should be faded, and it does, but when I knock on the second le, the third " Infos Div "Fade In. Third Lee affects fifth, and so on. I've included the jQuery code. Any help would be appreciated. Thank you. $ (document) .ready (function () {$ ('. Case-info'). Hide (); $ ('# text323-b li'). Mouseover (function ) {Var x = $ (this) .index (); $ ('. Case-info'). Eq (x) .fadeIn ();}); $ ('# text323-b li'). (Function ) {Var x = $ (this) .index ($); $ ('Case-info'). Eq (x). FadeOut (function () {$ (this) .hide ();});}); }); I am taking a knife in the dark and assume that you have other Markups are your LI Listings such as ...

sql server - Aggregate Function Group by Error -

The following is how I created the table: create table #tmp ([counter ] ET, not taped per day, Cam Float, Camemag Float, HFX Float, HFX Mate Float, Toremetic Float) The following is the following that I call on my desk in my script: SELECT ((ROW_NUMBER (per ROW_NUMBER) (1) / @ Avg) as a counter [counter], per, cam, average camimetric (chemmetric), HFXME, From # [Counter] by TMP group; Drop Table # TAP The following errors I get: Message 8120, Level 16, State 1, Line 175 Column '# TMP Per' Featured The list is invalid because it is not contained in a composite function or group by section. Message 8120, Level 16, State 1, Line 175 column is on '# TMP.' is invalid in the selection list because it is not contained in a composite function or Group BY clause. What am I doing wrong? The data looks like the following counter --- per --- cam --- hfx mail --- --- 1. 2012-02-09 3 16 1 2012-02-24 4 12 1 2012-03-04 2 15 2 2012-03-15 1 18 2 2012-03-30 6 20 ...

Matlab: How to fit a state space model to data with nlinfit -

I have run an experiment and want to fit data into a state space model. Unfortunately, I have some experience about how to implement this, so there was hope for some help. The participants of the experiment have access to different goals. Participants receive feedback about their movement through the cursor on the screen. This cursor displays their access movement, but rotates 30 degrees. . This means participants initially made big errors, but they reduced them with practice again. The following data provides results of some examples. Each value represents an 'era' (average of eight tests): 18.26 13.95 10.92 10.32 8.23 ​​6.57 7.05 5.98 5.99 4.58 4.35 3.72 3.71 3.04 4.47 4.16 I have found a paper that has used a similar experiment and fits a state space model for its data. The model is made up of two equations: 1) e (n) = p (n) - s (n) + e (n) 2) s (n + 1) = s (A) (A) (A) (A) (A) (A) (A) (N) = Error on test (i.e. above value) P (n) = applied to mobility movemen...

JQuery truncate and reveal -

I am trying to create an effect on my website, I have a container of information at the top of the page, acting As a header for this specific page, my 'header' item has some text and a bigger image, but this lesson needs to be shortened in certain characters. HTML Code> & lt; Div class = "container" & gt; & Lt; Div id = "mytext" class = "text" & gt; & Lt; H1 & gt; Household Advertising & lt; / H1> Door Seat Amet, The Persector Adipisive Elite has worked on a large scale to reach now. There is a very easy and easy way to get more information about you. EuIdom Portter is used by Annexe Favigate, Trepece NEC Special Puter, Teles Fret Arch, Yut Ultra Magna Fellis A.C. We all work on a large scale, but always like. During custom fringle lounculation, suppliers can be used easily. Integer for integer, ID Congo Epsom If you can already get any type of information for any time, or tell me what I am doing, bes...

php - rewrite rule pattern can't work right -

I did something like regex / profile to profile.php? Id = 1 & amp; Tried to write email = mediaicalboy@gmail.com again? / 9/medicalboy@gmail.com But the rule does not work: I did this php: & Lt; A href = "profile / htaccess Reviving OnRiverbase / Regex / Riverlight ^ Profile / ([0- 9] +) / (. *) $ Profile.php? ID = $ 1 and amp; Email = $ 2 [L] What's the problem? I read carefully about writing again, but I do not know where the problem is. me I knew the answer. I thought $ _GET would work like Yuri with Reggae / Profiles / 1/66, so $ _GET can not get information depend on uri so I blast Used id such as: $ url = $ _ server ['REQUEST_URI']; $ Exp = Explosion ("/", $ url); $ Id = $ exp [3]; $ Query = $ db- & gt; Query (Choose user from "User ID = '$ id'" *);

python - pandas dataframe plot columns -

After reading a series of files, I create a data frame with 7 columns: Int64Index: 756 entries, 0 to 755 Data columns: Furd (Hertz) 756 non-zero value res_ohm * m 756 non-zero value Step_made 756 non-zero value IMCSI / M756 non-empty value RMC / M756 non-empty value C_el 756 non -No value dated: 756 non-zero values ​​ dtypes: float64 (6), object (1) then I call column 6 ) With 12 variables: pairs = = data_set.groupby ('C_el') 21 in each group now I mean that every 21 lines I have a new unique dataset) 21 - Refers to column 1 (frames (hj), where i am using 21 frequencies for each dataset What do I have to do, y scattered Plot - Column 1 on the x-axis (Fryt (Hertz), and column 3 (step_mrrd) on the Y axis - each data There will be an expression of 21 unique frequencies in the net, and I want to add all the available datasets on the same plot, The last step, this is repeat for 11 remaining groups (as defined in an AirAir phase I ...

Unicorn and Rails eat up 2x MySQL connections -

I run 10 unicorn workers for each server and they all eat mySQL connections over time, "lots of connection error. It starts with 10 connections, but gradually increases to 20. When I run the following script (using the show processlist ), I can see that each IP (= app server) has 20 connections each where it Should be 10 - the number of excitly unicorn workers is doubled. Result = ActiveRecord :: base.connection.execute 'Show Prostallists' result.group_by {| I I [2] .split (':'). First} .map {| Kashmir, V. [K, v.size]} = & gt; [["192.168.1.2", 20], ["192.168.1.3", 20], ["192.168.1.4", 20], ...] The database here is Yml Production: Adapter: mysql2 ... pool: 1 Here's the netstate: # netstat - a | Grep: 3306 TCP 0 9 20.168.1.2: 18585 192.168.1.123:3306 Installed TCP 0 192.168.1.2:45021 192.168.1.123:3306 Installed TCP 0 9 20.168.1.2: 518537 192.168.1.123:3306 Installed TCP 0 0 192.168 1.2: 45119192.168.1.123:...

javascript - Messy order of operations issue -

Image
इस सवाल का पहले से ही एक उत्तर है: 21 उत्तर मेरे पास एक फ़ंक्शन है जो दिखता है इस तरह से: फ़ंक्शन showCreditCard (idx, डेटा) {यदि (प्रकार का कार्ड इनफ़ोन == 'अपरिभाषित' & amp; amp; parseInt ($ ("# cc-dropdown-" + idx + "विकल्प) : चयनित ")। Val (), 10) & gt; -1) {// वास्तविक चयन बना दिया है, लेकिन डिफ़ॉल्ट नहीं है, इसलिए cardInfo सेट नहीं किया गया है। क्रेडिट कार्ड प्राप्त करने के लिए अजाक्स कॉल चलाने की आवश्यकता है; Console.log ("शो ड्रॉपडाउन"); Console.log ("सहेजे गए कार्ड हैं और एक चयन किया गया था"); PoGetPaymentOption ('क्रेडिट कार्ड', parseInt ($ ("# cc-dropdown-" + idx + "विकल्प: चयनित")। Val (), 10), idx); // यह डिफ़ॉल्ट कार्ड है; डिफ़ॉल्ट चयनित और स्थिर फ़ील्ड console.log ("माना जाता है कि poGetPayment के बाद)" के साथ ड्रॉपडाउन प्रदर्शित करें; console.dir (cardInfo); // यह सामान poGetPaymentOtion खत्म होने से पहले क्यों चल रहा है और एक cardInfo वस्तु देता है? अगर (cardI...

Keeping a square clipping volume square, regardless of viewport size in opengl? -

I'm working through the OpenGL Superbib 4 version. If the viewport matches the dimensions of the window but matches the dimensions of the window, then a description of that window is mentioned, but it is mapped to a clipping volume, this image is distorted (long and thin viewport Like) The solution to keep the image class is the following code: // Install clipping volume (left, right, bottom, top, near, far) aspectRatio = (GL Float ) W / (GL Float) H; If (w An explanation has been given for this code, but I can not understand it. Why are we increasing the height of clipping according to Aspect RITIO? Two aspect ratios in OpenGLL that you need to be aware of: Aspect ratio of viewport , which is specified when you call glViewport See disappointment aspect ratio, which is specified through your projection change, whether it is cipher (e.g., defined by glOrtho ), or perspective glFrustum , or gluPerspective most often). Now, to provide intersections as...

Browser loses connection with Tomcat server -

I am sending a request for the Tomcat server (version 7.0.32). While the server acts on the request, the browser loses connection to the server. I tried to increase the connection, the time-value value shows 20000 to 80000 in server.xml, but it still shows the connection lost in the browser after 5 minutes. Do I need to change somewhere else or I have to take care of anything else, In my experience to check some things For browser-server connectivity: connectionTimeout acceptance minSpareThreads And then, if it One continues to lose connectivity with a specific resource: maxWait Maximum Active maxIdle removeAbandonedTimeout Hope that helps us tell us.

ember.js - Testing Ember Data - Switching to FixtureAdapter during test runs -

I have and I am setting this as a DS.Store : (function (app) {'strict use'; ... var store = DS.Store.extend ({revision: 12}); app.store = store;}) (Window.Balanced); Now I have a cube test and in that test I would like to swap the default restart for a fixture adapter so that I can set up the fixtures for my model. I think I have to write, but I'm not 100% sure: ('strict use'; var fixtureAdapter; module ('tests.store.module', {Setup: function} {fixtureAdapter = DS.FixtureAdapter.extend ({}) Integrated.store.RePan ({adapter: fixtureAdapter}); // TODO: How does it work? Balanced Market .Fixtures = [ Id: 1, name: '1'}, {id: 2, name: 'poop'}, {id: 3, name: 'poop'}];}, teardown: function () {// teardown code}} ); Test ("market query", function () {var marketplace = balanced. Marketplace.find (); // TODO: how do I check it?});}) (); For my basic unit testing with Jasmine, I manually set up the shop manually (using) ...

powershell - How to pass custom filter function to Where-Object -

For the past few hours I am trying to figure out how a script block can be filtered for the function Is the object. I have not received any documents, I should remember something. I looked at "filter script" and "function: script" definitions, but I do not know how it is used and I can not find it anywhere. function test {the ultimate ($ f, $) $ x = $ what? Where $ f $ x} $ mywhat = @ ('aaa,' b ',' abb ',' bac ') Filter Script: myfilter {$ _- like' a * '} Test- $ mywhat -xx $ myfilter Can someone point me in the right direction? It is not clear what you are asking here. A filter is a function and not a script block where the object takes the script as the input if you want to specify the position inside a function using parameters , Then you can use script block-parameter. function test {param ([scriptblock] $ f, $ what) $ x = $ what | Where $ f $ x} $ myfilter = {$ _- like 'a *'} test- what $ mywhat ...

javascript - User session with backbone.js -

I am writing a web app with Backbone.js and require.js for which all to use during the app User information needs to be stored User login Currently, when a user submits credentials there, a web service authenticates the user and gives data about that user. Traditionally, I could store that information in a session, how can I use this redbone? You may want to use HTML5 for that. Take a look at the session storage adapter for backbone integration.

php - Will dynamically inserted meta tags(by javascript) be detected and picked up by Twitterbot? (twitter photo card) -

Is this possible? Does TweeterBot detect and process dynamically inserted meta tags? If not, it would mean that the meta tag should be presented with a server-side script. However, the one on which I am working uses the hashtag to dynamically change the content (AJAX). What will be the best and proven approach in this environment? Thank you for your help. As far as I have tried, the Twitterbot crawler does not present JavaScript. In my case, I am generating a meta tag for the Twitter card only when * HTTP_USER_AGENT * is the TwitterBot code starts with something like this. If you want to check (Strippo ($ _ server ['HTTP_USER_AGENT'], 'twitterbot') == incorrect) { Whether or not your code works by testing the URL of the Twitter card on its valeteur. Hope this help!

ArUco in Eclipse Ubuntu -

I want to compile augmented reality Arooco library, but this library document on the internet is very rare and I have some problems . Can anyone give me some tutorials about how to compile it in Eclipse? (Can be another IDE) I am using Ubuntu 12.10, Eclipse Juno. Thanks! Look at the library's README file, you'll probably have to use it to open the terminal and apt- Get cmake and OpenCv (requirements for library) from get . I do not know my exact package names in Ubuntu, but try clear cmake and opencv once this is done, cd in that directory Where you unpacked the Aruco library, and do the following: mkdir build & amp; Amp; CD build cmake .. to install all You can use the installation prefix by using cmake -i .. or ccmake It was also set up to set up a library in its IDE, just note in which directory the library files (binaries and headers) were installed, and make sure they are in the search path of the compiler .

c - How assign task to individual thread using OpenMP? -

I am taking the array of 20. And OpenMP is used to specify 1 / 4th work for each of the four threads in order. And then what is wrong to store the results of the whole array of files? In the first array, I am assigning the value i * j to each element, then multiply the matrix of 20 x 20. # include & lt; Stdio.h & gt; #to & lt include, omp.h & gt; #include "head.h" int sum = 0; Int C [20] [20]; //#include<conio.h> Int main (zero) {int a [20] [20], b [20] [20], c [20] [20]; Int i, j, e; Constant amount = 0; File * FP; Unsigned long A, B, C, D; Int threadno; Fp = fopen ("m2.txt", "w"); // clrscr (); Printf ("\ n% d \ n", h [20] [20]); #pragma omp parallel share (A, B, C, D) {thread = omp_get_thread_num (); If (Threado == 0) for {for (i = 0; i & lt; 5; i ++) (j = 0; j & lt; 5; j ++) a [i] [j] = i * J; B [i] [j] = i j *; For (i = 0; i & lt; 5; i ++) for (j = 0; j and lt; 5; j ++) for (e = 0; e & lt; 5; e ...

java - Checking for data in array indexes -

I am trying to create a program that will be read in a file, split that file into an array where " "And then the variable" theOutput "is set as the value of the index in the array. The problem is that the index is always equal to the null. Here is my code: string theOutput = null; String content = new scanner (new file ("URL.txt"). UseDelimiter ("\\ Z"). Next (); TheInput = content; string [] URL = theInput.split ("/"); Println (theInput ); Println (URL.length); if (URL.length == 1) {theOutput = URL [0]; if (URL.length == 3) {theOutput = URL [2]; if (URL.length == 4) {theOutput = URL [3]; if (URL.length == 5) {theOutput = URL [4]; if (URL.length == 6) {theOutput = URL [5];}}} An example of the data found in the file will be "coffee: // localhost / bru", so it does not always use index 5 in the array. If your statement is a different If the nest is nested in, then if (URL.length == 3) only the length of the URL...

sql server 2012 - Convert "YYYYMMDD" format string to date in MDX? -

ग्रीटिंग्स प्रिय तो दोस्तों, मुझे "YYYYMMDD" पर तिथि संबंधी कार्यों को लागू करने के साथ कुछ समस्या है MDX में प्रारूप स्ट्रिंग उदाहरण के लिए, अगर मुझे नीचे यह प्रश्न है: सदस्य फू के साथ WEEKDay ("2013-03-21") [0] कुछ क्यूब [0] से 0 पर एफयू चुनिए यह SSMS में foo के लिए सही ढंग से आउटपुट "5" होगा लेकिन अगर मैं दूसरी पंक्ति को इस प्रकार बदलता हूं: सदस्य फू के रूप में WEEKDay ("20130321") दुर्भाग्य से, यह "प्रकार बेमेल" त्रुटि फेंक देगा तो मुझे क्या करना है जो स्ट्रिंग को कुछ पहचानने योग्य दिनांक स्वरूप में परिवर्तित करना है और उसके बाद उसके कार्यों को लागू करना है आसान तरीका के लिए कोई भी विचार, उदा। मौजूदा फ़ंक्शंस का उपयोग कर? कृपया ध्यान दें कि स्ट्रिंग वास्तव में किसी भी घन में सदस्यों से इनपुट की जाती है जहां MDX चल रहा है। इसलिए स्ट्रिंग प्रारूप पहचानने योग्य हो सकता था, उदा। "YYYY-MM-DD"। चीयर्स विषय बहुत पुराना है, लेकिन शायद यह किसी को मदद कर सकता है तकनीक बहुत ही क्रूर है, लेकिन स्केलेबल ह...

graphics - What does uv.zw mean in HLSL? -

I am trying to use HLSL code as the basis for an experiment, but I do not know the UV . It shows: float4 uv0: TEXCOORD0 ... uv0.zw; UV is not just 2? I know UVAVE 3 supports, but what is the fourth component? Alpha? In online examples, I used to only TEXCOORD0 float2 values, float4 was not found.

php - How to get the most recent article date for each category -

मेरे पास एक लेख तालिका और एक श्रेणियां सारणी है: लेख --------------------------------------- -------- | आईडी | दिन-समय | शीर्षक | श्रेणीगत | स्थिति | ----------------------------------------------- श्रेणियाँ -- ----------- | आईडी | नाम | ------------- मुझे चुनने में प्रत्येक श्रेणी से नवीनतम आलेखों की तिथि प्राप्त करने की आवश्यकता है, जैसे: परिणाम ----------------------------------------------- ----------- | श्रेणी आईडी | श्रेणी का नाम | हालिया लेख की तारीख | -------------------------------------------------- इसका परिणाम होना चाहिए बिल्कुल श्रेणियों से चयन करें PLUS एक नया पंक्ति दिनचर्या वर्ग के सबसे हाल के लेख के लेकिन केवल अगर लेख स्थिति 0 है, तो दिखा रहा है। । क्या यह स्पष्ट है? इसका कारण मुझे इसकी आवश्यकता है क्योंकि मैं एक गतिशील साइटमैप बनाने की कोशिश कर रहा हूं और मुझे नवीनतम श्रेणी के समय को प्रत्येक श्रेणी में दिखाने की आवश्यकता है श्रेणियों की सूची के लिए और lt; lastmod & gt; टैग। $ sql = mysql_query ("..... ......... ......");...

PHP Script To Run in background of application (MYSQL) -

I currently have a stock control system, all of which are working fine. (In PHP and MYSQL) What I have done is set the "minimum_on_hand" column on the database, which will tell the minimum amount of that particular stock item, before more orders are required . / P> As soon as one item reaches at least (which is made) can work with the company, I want to throw a warning to it, and then repeat through the database, thereby Sometimes the stock items will decrease And then, to compile those orders, give the user a minimum of a list I have only one current idea Every time a new page loads a script Call, but it will cause a huge hit on the database. Can anyone provide solutions? chronose The last time the script was killed, check the last execution time before the next execution. if (time () - $ last

multithreading - Adobe Air Desktop App hanging-up (not responding) -

I'm networking in my app. Data sent by PC (with installed applications) is approximately 3 KB Together (real-time computations are done in my app) .. I was wondering why my app was not responding while sending data to different PCs? Second question: How can I get multithreading in Adobe Air Desktop apps? Sorry for my english ... For your second question for multi threading in the Adobe Air Desktop app, you will need Flash Player 11.4 and AIR 3.4 would be required. Before we can help, first post the code for the question.

sql - MySQL View, Union and Group By -

I am trying to write this SQL query: t1.tms_id, t1 Choose as Ktms_name, (select t1.Pts t.tms_id, t.tms_name, SUM tb_league as (points as s.lsc_1stscore) T, L, g in tb_game, tb_score as tb_team as Where s (t.tms_id = l.lgs_1stplace) and (l.fk_lsc_id = s.lsc_id) AND (t.fk_gms_id = g.gms_id) AND (g.gms_id = 1) GROUP by T.T.M.S. _NA) Select T1 Union T2 TMS_ID, T2 TMS_Name, T2. The PTS (t.tms_id, t.tms_name, SUM (as selected s.lsc_2ndscore) points t, tb_league L, g as tb_game, as tb_score as the tb_team where (t.tms_id = L.lgs_2ndplace) and (l.fk_lsc_id = S.lsc_id) AND (t.fk_gms_id = g.gms_id) AND (g.gms_id = 1) GROUP by T.TMSS_NA) T2 Union T3. tms_id, T3.tms_name, the T3.Pts (SELECT t.tms_id, t .tms_name, (s.lsc_3rdscore) L as tb_league, g as tb_game, as the sum of points tb_score as tb_team where s (T.tms_id = l.lgs_3rdplace) and (l.fk_lsc_id = s.lsc_id) and (t.fk_gms_id = g.gms_id) and (g.gms_id = 1) group TTMs _name) Select t3 union t4.tms_id, tb_league as T, L as the number (t.t...

jquery - Change width of div as orientation of mobile change in magento -

I am working on the Magnmo mobile topic. I want to set the width of Lee based on the mobile screen. For this I & lt; Script & gt; JQuery (function () {var width = jQuery (window) .Width (); jQuery (". Press_li") width (width * 0.75);}); & Lt; / Script & gt; It does work but when the orientation changes, the width does not change. For this, I am trying to use jQuery-Mobile, but when I include jQuery, the second jazz stop is working. You can use the next code to fix your problem function set () {var width = jQuery (window) Width (); JQuery (". Press_li") width (width * 0.75); } $ (Document) .ready (function () {setPositions ()}) $ (window). Reset (function () {setPositions ()}) See the example:

java - Form regular expression from byte array? -

How do I create a regular expression from a byte array? For example, I have the array A: byte [] a = {'a', 't'}; I would like to use a regex pattern from A to A [ag] t I How can I use Maitre? byte [] a = {'A', 't'}; String aStr = new string (A); String Reggae = "[AG] T"; If (aStr.matches (regex)) {// Match} else {// is not a match} You can try to do something like that.

android - Getting installed app size -

I would like to achieve an installed app size, I am trying to learn it. what has already failed: - new file ( "/ data / app / some.apk ') - Report incorrect size - PackageManager.getPackageSizeInfo (string PackageName, IPackageStatsObserver Observer) - the @hide and depends on some obscure IPackageStatsObserver results so I can not call it through reflection . Unfortunately, the current official to do so. However, if you import AIDL and generate stubs in our project, then you can call the hidden method. You can use the reflection to reapply: PackageManager pm = getPackageManager (); . Method getPackageSizeInfo = pm.getClass () getMethod ( "getPackageSizeInfo", String.class, IPackageStatsObserver.class); getPackageSizeInfo.invoke (pm, "com.android.mms", New IPackageStatsObserver.Stub () {@Override public void onGetStatsCompleted (PackageStats pStats, Boolean successful) throws RemoteException {Log.i (TAG, "codeSize:" + pSta...

c# - ReportViewer - Fixed Page Header and Footer -

Is there any possible way to fix the page header and footer so that it scrolls and takes it to another page hi You will have to click on the columns located above the header of the Report Designer. This table will select the entire column including headers, table descriptions, table footers and click on Property (F4). Fixed header property change correct

c# - is there better ways to get gridview values? -

for gridview How can I get the value of a cell when I click on a button and sometimes on this button I can be embedded in a gridview line, maybe anywhere else on the page beyond the gridview. My stupid and simple way is to create control of Gridview columns by creating each column as a label type on the client side, so it has something on the server to get values ​​like this text, label lblName = (label) gvName.Rows [gvName.RowIndex] .FindControl ("lblSomeContent") This is fine when it's just a few columns, but what if ten If there are more than different columns, should I do this again and again? Is there a better way? I have every gridview Trying to loop through the lights, but there are always empty values, which I do not know why. What you can do You can make an example of the grid row / example, and then you can use the control: "post-text" itemprop = "text" GridViewRow gRow = gvName.Rows [gvName.RowIndex]; and then use the contr...

php - Prevent cache in CloudFlare -

I'm in the middle of a project, and tomorrow I'm starting with CloudFlare. The problem is that when I make a change, I can not see it in the browser, so I think the problem here is CloudFlare's cache setting. I have read this, about CloudFlare cache, so I put my html in a meta-tag: But the problem persists. Should I put another meta-tag, or should the server-side stop it from the cache? (I am using PHP) development mode in the cloud panel The option is: Changes to cacheable content (such as images, CSS, or javascript) will be instantly visible. Accelerated cache of cloudflay will be disabled. If there is no immediate change in your site, press Change-Reload. You will also be able to close development mode at any time during the 3 hours. Hope this helps with people looking for answers similar to this question or if you still have this problem.

asp.net - uploaded file content preview -

In my asp.net web application, I want a third party file content preview tool, using that tool I uploaded Files (jpg or tiff or xls or pdf or text or document) protected void btn_upload_Click (object sender, EventArgs e) {try {if (flup_upload.HasFile) {_fname = flup_upload .FileName. ("", "") To change; String ext = path. Gate Extension (_fname) .lover (); If (ext == ".jpg" || ext == ".jpeg" || ext == ".bmp") {------} and if (ext == ".xls" || ext = = ".xlsx") {-----} else if (ext == ".pdf") {-----} else if (ext == ".tif" || ext == ".tiff" ) {---} else if (ext == ".txt") {----} else if (ext == ".docx" || ext == ".doc") {-----} I.e. upload a file (like jpg / tiff / xls / pdf / txt / doc) after capture (exception pre) {}} I want to show the file data in a preview Are there. After You can use the AJAX Control Lotty File Uploader to do this; ...

ruby - How do I undo a gem install that messed up my Rails app? -

I have set up a gem to make my URL insensitive, but I see many broken links. Instead of going through and trying to fix them, I did not just set what I did. If I run Uninstall gemname , then how will it deliver my railway app first? You have to remove the gem from your Gemfile . Check your Gemfile.lock and see also the gem dependencies. Of course, if you refer to the gem anywhere in your app, then you have to remove those references too.

Access Violation in query in Delphi XE2 -

I have a query in qryDoABC function DoABC . When I call this function for the first time, all the work is fine, but the second time when I call it, on line with qryDoABC, this entry violation throws an exception. processing TMyForm.DoABC; Start the qryDoABC do - - End; I went googled and found out that I should check whether the query was assigned or if I am now seeing whether the query has been assigned, it would: processing TMyForm.DoABC; If qryDoABC is assigned then start with qryDoABC - - end; There is no exception now because the query for the second time has not been assigned. But I have to fire the trigger twice too. How should I assign this query a second time? Full code: function TMyForm.DoABC: boolean; If you start with qryDoABCdo, try turning off (qryDoABC) to stop; SQL.Clear; SQL.Text: = 'Some Queries'; Parameters.ParamByName ('ABC'). Value: = ABC; Parameters.ParamByName ('XYZ'). Value: = XYZ; Open; If (Reconcount = 0) results th...

Android Check if call forwarding is activated -

I am creating a call forwarding application and activating call forwarding using ACTION_CALL intent ** 21 * Xxxxxx # ussd code is used. But I have not found any solutions to find out if call forwarding is active or not. If any call forwarding is active or is there a solution to check with the Android system? You can register the broadcast class and you can track like a calling call Public class callborkcast receivers broadcasts broadcasts receivers {public static string number toll; But public nil (reference reference, intent to intent) {log d. ("Callercorder", "callbroxtriceurver :: on receipt intent:" + intent.toString ()); If (intent.getAction (.) Equals (Intent.ACTION_NEW_OUTGOING_CALL)) {numberToCall = intent.getStringExtra (Intent.EXTRA_PHONE_NUMBER); Log D. ("Callercorder", "is the EXTRA_PHONE_NUMBER intended for the callboscedide receiver:" + number to call); }}}

MATLAB include error : fatal error C1083: Cannot open include file: 'cblas.h' -

I am using an optimization toolbox to solve rare estimation problems. I downloaded the software and would like to create a Max file from mexLasso.m for my application. I include all error-inwatching in the matbab exterior / included folder. In MATLAB, once I type: & gt; & Gt; I get this error: C: \ Program Files \ MATLAB \ r2012b \ extern \ include \ utils.h (28) Fatal error C1083: File can not be included: 'cblas.h' How can I solve this problem? Thanks For Mac: have you set up your compiler? & gt; & Gt; Select the Visual Studio Compiler at Max -Step Matlab's LCC . Do you have a header file cblas.h ? Where is it located? Use the following flag to compile & gt; & Gt; You should give a verbose output - Mex-o -largeArrayDims-v mexLasso.cpp header file. You flag -i & lt; Folder name & gt; Can add folders in search path with

python - count number of ones in a given integer -

How do you calculate the number of people in the binary representation of the given integer. Say you have given a number, 20 , which is in binary, 10100 , so many people have 2 numbers. Use the awesome module. & gt; & Gt; & Gt; Counter import from & gt; & Gt; & Gt; Binary = Bin (20) [2:]> gt; & Gt; & Gt; Counter (binary) counter ({'0': 3, '1': 2}) Or you can use the built-in function count () : & gt; & Gt; & Gt; Binary = Bin (20) [2:]> gt; & Gt; & Gt; BinaryCount ('1') 2 Or even: & gt; & Gt; & Gt; (Amount for bin (20) in (I): If I == '1' 2) But this final solution is slower than count (

android - How to implement an application to take image from appropriate folder? -

I am working on the Android app because it should be helpful in all screen sizes. But it is not working properly. I can determine whether it will get a picture from the picture-HDPI folder for 480 × 800 size? The screen size and the DPI are not the same thing DPI is a pixel per inch number is still a 480x800 screen It can be at any DPI level - it will be a small screen with only high DPI You can try to override the size with Drawable-SWNdp where N is a pixel value. It works for layouts, I believe it works for drawables.

modal dialog - Opening Foundation Reveal on Click & Callback Functions? -

I am migrating from the jQueryTools overlay, and I can not really understand the docs how an open javascript is open accident. It is believed that I have this code: & lt; A href = "# Appearance Model" class = "Reveal Trigger" & gt; Click me for a model & lt; / A & gt; & Lt; Div id = "manifested model" class = "manifest-mode" & gt; & Lt; P & gt; I have a good paragraph that lives inside a cooler model; / P & gt; & Lt; / Div & gt; Typically, I code code code in the jQueryTools overlay, such as the code: $ ('.tracker'). Click (function () {$ ('#revealModal') Reveal ();}); But does this work do the same true code appear for it? And what about the callback events? I can write something like this: $ ('reveal'). Click (function () ($ ('# revealModal'). Reveal ({open: function () {// Prepare some things before showing}, opened: function () {// Open by Open ...

ruby on rails - render the show page, inside my index page through a modal -

I am using a model to pop up the show page inside the index page ..... my Start using partial @ product.name in the show page. I get this error: 'Names' for the undefined method zero: NilClass I know this is a Easy fix, please help ... This is my code for Rail: View _show.html .erb and & Lt; Strong & gt; Coming soon. & Lt; / Strong> & Lt; / H1> & Lt; Br> & Lt; Br> & Lt; P & gt; & Lt; B & gt; Name: & lt; / B & gt; ** & lt;% = @ product.name% & gt; ** & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; index.html.erb & lt;% = render: partial = & gt; "Show",: Local => {: Product = & gt; @ Productive}%> & Lt; Div class = "row" & gt; & Lt;% @ products.each do | Products | & Gt%; & Lt; Div class = "span3" & gt; & Lt; A href = "# myModal" role = "button" data-toggle = ...

Is there any way to customize card.io SDK? -

First let me thank you for the excellent SDK for your hard work and excellent credit card processing. I want to customize it to come to a point and my client's needs. Is there any way to customize it? Say for example, I have the name of the card holder, card, business people want to add more? You can find the header files is well documented the ship with all available Optimization SDK. If this is something you want that document is not available through headers, your facility Feel @ Cardkio to drop a note to support the request.

php - How do I parse tags and attributes into a multidimensional array? -

मैं निम्न कैसे पार्स कर सकता हूं {menu id = "123"} यादृच्छिक पाठ । {Menu-item id = "123" /} रैंडम टेक्स्ट सरणी में {menu-item id = "123"}} {/ menu} जैसे, सरणी ([मेनू] = & gt; Array ([id] = & gt; 123 [बच्चों] = & gt; ऐरे ([मेनू आइटम] = अर्रे ([आईडी] = & gt; 123) [मेनू आइटम] = सरणी ([आईडी] => 123)) )) यह एचटीएमएल के समान है टैग्स जो एक समापन टैग नहीं हैं, स्वयं बंद हैं। एमएमएच - यदि यह html जैसा है तो कोशिश कर सकते हैं और इसे एक्सएमएल और उपयोग की तरह व्यवहार कर सकते हैं। आइए इसे एक कोशिश दें: $ xmlData = str_replace (सरणी ('{', '}'), सरणी ('& lt;', '& gt;' ), $ SourceData); $ XmlObj = सरल एक्सएमएललोड_स्ट्रिंग ($ xmlData); Var_dump ($ xmlObj); जिसके परिणामस्वरूप ऑब्जेक्ट संरचना का 100% नहीं हो सकता है जिसे आप बनाने की कोशिश कर रहे हैं, लेकिन अब यह बहुत आसान है। आपकी प्रतिक्रिया की ओर अग्रसर, मज़े!

objective c - NSDictionary and NSArray -

मेरे पास नाम और छवियों का सार है जैसे NSArray * names = [[NSArray Alloc] initWithObjects: @ "नवीन", @ "कुमार", शून्य]; NSArray * images = [[NSArray alloc] initWithObjects: [UIImage imageNamed: @ "1.jpg"], [UIImage imageNamed: @ "2.jpg"], शून्य]; मैं निम्नलिखित प्रारूप में एक शब्दकोश बनाना चाहता हूं सूची: आइटम 0: नयाँ 1.jpg आइटम 1: कुमार 2.jpg मैं यह कैसे बना सकता हूँ? कृपया आपको ऐसा करना होगा: NSMutableDictionary * NameImageDict = [NSMutableDictionary नया]; (NSInteger i = 0; i & lt; names.count; i ++) के लिए {NSArray * array = @ [नाम [i], चित्र [i]]; // या पुराने कंपाइलर 4.3 और नीचे से / NSArray * array = [NSArray arrayWithObjects: [names objectAtIndex: i], [छवियाँ objectAtIndex: i], शून्य]; [NameImageDict सेट ऑब्जेक्ट: के लिए सरणी: [NSString stringWithFormat: @ "आइटम% d", i]]; } कुंजी आइटम 0 के लिए: यह एक सरणी होगा। सरणी में नाम और छवि होती है।

ubuntu - How to add multiple files in git -

I have 4 files in a folder. I have modified 3 of them. How do I add and push only modified files at a time? Will "add git." Work here git add git commit -m "message" git push

javascript - How to format datetime with the datetimepicker plugin? -

मुझे क्या चाहिए एक प्रारूप है: गुरु, 13 मार्च 2013 03: 28pm यहां तक ​​कि मैंने अभी तक कोशिश की है: $ ('। Datetimepicker')। Datepicker ({dateFormat: 'डी, डी एम Yy hh: mm '}); यह मेरा परिणाम है: गुरु, 13 मार्च 2013 hh: 03 मैं क्या कर सकता हूँ वांछित प्रारूप पाने के लिए क्या करें? मुझे नहीं लगता कि आप इसे dateFormat सिर्फ तारीखपिकर के लिए है, आपको इसे टाइमपीकर के माध्यम से भी हासिल करना होगा यह एक ब्लॉग बताया गया है कि आप इसे कैसे प्राप्त कर सकते हैं:

c++ - Is it possible to get GCC 3.4.6 to compile UTF-8 with BOM source files? -

I have a C ++ application that uses the Unicode string in it, I have the solution ---- Visual Studio 2012 Had used. ------ Window 7 The file is saved in UL-8 (Bit Order Marker) in UOT-8. When I run the same file in Linux, I get the following error: - Error: Error in Program 1: '239': Error: Hobo '\ 187' in Program 1: Error: Hobby '\ 191' in the program I have found that GCC will not support BOM in C ++ file. If I remove BOM by file error then it will be resolved. Is there a way by which I can compile my application in which the files have been saved in UOTF-8, which is kept in BOM? One more thing, I am compiling applications in "Red Hat Enterprise Linux 4 Edition", where GCC version 3.4.6. Please help me in this regard. Thanks & amp; Regards Development @GCC: You can use -lstdc ++ Compiler option to compile UK-8 BOM files (I'm adding it here , Because this thread is a high rated result on Google about this topic) ...

#ifdef in c for filename for guarding static function in header file -

I have a condition in which I have a header file and it must be included in more than one file in it some fixed functions The prototype is something I want to do #ifdef filename.c static foo (zero); Static bar; #endif This means that if I include it in the filename by the file name, these function prototypes are active and if they are included in another file they are cool filename.c is a relative unusual symbol. In addition, you must explicitly define a mark in your filename-file. Like: #ifdef FILENAME_C_ static foo (zero); Static bar; #endif and your filename.c -file #define FILENAME_C_ You should like the underscore _ -version in FILENAME_C _ , it is more general and easy to read, however, I do not understand that you can only do those tasks Why would you declare it? You have to define them in filename.c-file anyway. What do you want to achieve with this?

android - How to capture video using Intent and set path of recorded and limit recording time -

i intended intent = an example of video recording using intent based on new intent I use (android.provider.MediaStore.ACTION_VIDEO_CAPTURE); StartActivityForResult (intent, REQUEST_VIDEO_CAPTURED); I have used the time limit: intent.putExtra ("android.intent.extra.durationLimit", 5); It records 5 seconds and then automatically closes. I used an example from the URL: This example is interesting to me because it works on all my devices and it is easy to implement. Is it possible to set the path to save the record video? Let me assume that I need a video to save "myrecordedvideo.mp4" to the file specified in the specified file and actually requires 5 seconds of video. Is it possible to make easy way with this effect? Set deadlines and set paths to save the video Intent LavioInantent = New Intent (MediaStore. Action_Vedacular); TakeVideoIntent.putExtra (MediaStore.EXTRA_DURATION_LIMIT, 30); TakeVideoIntent.putExtra (MediaStore.EXTRA_OUTPUT, Envir...

android - How to bind data to custom calendar widget -

Image
I am doing a project based on receiving events from the server and displaying them in a calendar widget. I am able to display calendars in my app. But unable to bind server data in the calendar. I want something like this: I get a calendar view , But I want to pair the events of the server and show them the shown above. If there is an event, So it should appear on a special date. Recommend me the best way to do this. I personally run a background function that downloads everything, a database and then click event After a click on it displays in the list view.

php - Are there cons of my technique for designing multilingual websites -

I am preparing a multilingual website and it is both ltr and rtl . Language: I store languages ​​in arrays like this, such as $ lan = array ('browse' = & gt; 'Ø ØμÙ? Ø', 'plus' = & gt; 'Ø ¥ ØØØ§Ù ?? Ø ·', signin '=>' تسج ?? Ù ?? Ø Ø Ø ¯ Ù Ù Ù? ? '); and saved them in different php files and I include the selected language I want it to be HTML code such as & lt ;? Php echo $ lan ['browse'] ;? & Gt; Use in direction: Most directional issues can be sorted by CSS property dir is. However, sometimes you need to specify different attributes for different directions. Therefore, I have given the body a class name which is "rtl" or "ltr" and then I use it as: .brs_search_box {display: inline-block ; Width: 199px; Border: 1 px solid # d3d3d3; Height: 500px; } .rtl .brs_search_box {boundary-left: 0; } .ltr .brs_search_box {border-right: 0; } Is it bad for this technique...

MS SQL Server 2008 :Getting start date and end date of the week to next 8 weeks -

I'm new to SQL, someone can give me a query for this scenario, "let me show the start-up and end The requirement is from today's date to the next 8 weeks. For example, if I select today's date, then it should show start date | End date 17/03/2012 | 23/03/2012 24/03/2012 | 29/03/2012 .. etc 28/04/2012 | 03/05/2013 Try it out: DECLARE @startDATE DATETIME DECLARE @ current date DATETIME DECLARE @numberOfWeeks INT DECLARE @Dates TABLE (start date time, end date date time) SET @startDate = GETDATE () - '2012-01-01' - whatever you want Set here @ number not check = 8 - set the number of weeks here SET @currentDate = @startdate while @currentDate & lt; Get Started in Date @ (Start date, end date) Date @ @ date (date, date, 6, @ current date) set date @ datedate (day, day, date, 7, @right date); Select end * to date @ This will give you something like this: Start date expires 21/03/2013 11:22:46 27 / 03/2013 11:22:46 28/03/2013 11:22:4...

php - href javascript function call -

I am trying to call a function at href, but it does not show undefined function, but this function works by itself The loop is doing when I call it inside the album. Is there any other way of calling the ARP after adding the function? I tried to use jquery onclick with anchor id, but it does not work either and no errors are found. Any ideas how should I be called? Photos.data) .each (function (index, value) {console.log (value.source);});}); } FB.API ('/ m / album', {limit: 5000, field: 'id, name, count, cover_photo, link'}, function (m_y album) {$ (me_album.data) .each (function (index , Value) {FBPI ('/' + value.id + '/ image', {range: 5000}, function (image) {$ ('# facebook-cover'). Attachment ('& lt; li id = "'+ Value.id +'" & gt; & lt; a href = "javascript: getPhotosByAlbumID ('+ value.id +');" id = "album" & gt; & lt; img src = "'+ Image. data....

html - CSS adding elements inside elements? -

I have 4 elements "block" "button 1" button 2 "and" label ". I block is to be placed under the button by CSS. This can be done by HTML in this way: class = "Label"> one square = "button 1"> & lt; one class = "button2" & gt; & lt ; / A & gt; & lt; / p & gt; But it will take up a lot more space than 50 times in one place. Change the button '12 'href to the least button as a possible line of code CSS is to modify the appearance of a page, and not used to add content - Although pseudo elements such as : before and : after are commonly used for decorative purposes (for example, adding arrows, or layout hanks) Have you considered using a JS based method? You can loop through all the .block elements and then enter the labels and buttons in each of them. An example of a JS-based method would be: (assuming you are using JQuery) $ (document) .ready (function () ...

The best way to search according to distance in ruby on rails -

In the Roar, suppose in my database there is a list of geo-referenced data (each record has latitude and longitude columns) Is the best way to implement distance function according to the search? I have information about giocrit for Ruby. But I am looking for other suggestions if it is dependent on the platform, then I am planning to use my own as a deployment platform. you have checked, Read it in

How to compare two Date and Time and get Day,Month,hour,min in Android? -

I have this type of string in format 01-18-2013 06:43:35 Now, I want to compare it Get date and day, month, hour, minimum, with current date and time. I searched it, but no solution was found ... please share some solutions .. Thanks .. It can be helpful, You can parse date by using the date format DF = DateFormat.getDateInstance (); MyDate = df.parse (myString);

tortoisesvn - pushing svn repository files to the server -

Currently I am using Turtzessen My repository is on a Windows server (when the customer related customer changes) (Repository) is updated. I wanted to update the changes to my live server (linux). I do not have a paradox setup on my live server. I just downloaded files from Windows Server Tortoisesvn Store to Live Server (Linux) Copy wanted. I tried to manually copy the files but I could not find my files inside the repository folder. Is there any way to file and transfer? it Alternatively, see a working copy on your live server, Sign in and run svn update as needed.

facebook - fql OR and order by desc with offset -

I have some problems with facebook's fql request :). When I request this way SELECT uid, profile_url where user selects '(' potatoe ') or ID (profile identity id where' (potatoe ')) Order LIMIT 0,2 by mutual_friend_count If I change the dexc to "offset" ASC, then I always get the same result, even if I offset Change ... Works ... If I change or else and in its order desc = & gt; "Offset" also works! Something wrong with me or / drd / offset combo? Or is there some misunderstanding with me "or" operator? : / Thank you very much. You should write your FQL query like that SELECT uid LIMIT 0,2, where the UID is selected (select UID from the user where 'Potato')) The FQL could not interpret the result of "included" in the Boolean expression, so your Or operator failed here ...

Android text to image -

I want to convert the image to an image in a string and display it in a ImageView Besides, I want to get the dimensions of the image created at run time for further use. Here's what I've done and used from the search. tv = new text view (this); RelativeLayout.LayoutParams LayoutThird = New Relative Layout LayoutParam (layout paramaMATHPARNR, 60); Tv.setLayoutParams (layoutParams); Tv.setText ("Some text may be as long as possible"); Tv.setTextColor (Color.BLACK); Tv.setBackgroundColor (Color.WHITE); Bitmap test b; Timer = new timer (); Timer Schedulhe (new tickerTask (), 1000,25); TestB = Bitmap.SetByTemap (600, 20, Bitmap config.argb_8888); Canvas C = new canvas (test b); TV. Layout (0, 0, 380, 100); Tv.draw (c); Iv = (ImageView) findViewById (R.id.menuIcon); Iv.setLayoutParams (layoutParams); Iv.setBackgroundColor (Color.GREEN); Iv.setImageBitmap (testB); Problems: The parameters are not working as set in the code. The whole text is not shown after conve...

ubuntu - Mysql Load Data for existing column of a table -

Initially I uploaded the load data using the infiline line I 100,000 IU is using Ubuntu Example: Data toncode .... artist ... movie name ... language 1 ............. ....... mj .......... tap ........... english 3 ........... ........ AB .......... tap ........... english 4 .......... ....... ... CD ......... empty ........... english 5 ......... ....... .... ef .......... tap ........... english But now I update the column movie name ToneCode 1 to 100000 A line to update the IAC. To keep the data in the csv file Please inform how to upload a CSV file for the existing table with data I think that The fastest way to do this is to use MySQL purely and do not have any additional scripting, as follows: Create a floating table, two column toncode and movie name on your target's table. Similar Load the data data loaded from your new CSV file to INFILE's sub. Ignore Update your target table using syntax like INNER JOIN that describes: UPDATE item, mon...

javascript - scroll inside of a doppable DIV while dragging near of the bottom -

Image
I have more than one draggable device inside the scrollable device, when I drag them into a droppable zone (Which is also a scrollable Dave), the doppable DIV does not scroll down. Just to say how the page is running, should you just scroll while pulling a dragable divan? My current jquery code for creating a divace draggable $ ("drag_item"). Dragable ({helper: 'clone', scroll: true, drag: function (event, UI) {$ (this) .css ('z-index', '100');}}); I came up with this solution: var direction = {}; Var bound = {}; Var scrolling = falls; Var Container = document.getElementById ("Container"); $ ('# Table-container') .on ('dragstart', draggable, function (event, UI) {bound = {right: $ (container) .offet (). Left + $ (container) .Wide () - 50, left: $ (container) .offet (). Left + 50, top: $ (container) .offet (). Top + 50, below: $ (container) .offet (). Top + $ (container) height () - 50};}). ('Draggable...