Posts

Showing posts from June, 2010

javascript - Fusion table alternative -

I am using Fusion Table layer on Google Map. It works fine, but its range is 100K lines Google has also released Google Maps Engine and I understand that it is similar to the Fusion Table with high bid limit for enterprise application. is it true? Is he continuing to official use? My main question is if there is a way with API calls fusion changing table layer which Jessn with all polygon points and data required to plot on a map. I was called a few and I do not know how I can use it to change the Fusion Table layer. If I go with my logic, then due to the large amount of data, will it be faster in terms of performance? Any other suggestions or options of Fusion Table Layer? stateLayer = new google.maps.FusionTablesLayer ({query: {select: '\' Jiokodebl address \ 'from:' 1rDDfLsnufOJ6a23423adskfjl23423 '}, styles: [{where: "count & lt ; = 10 ", polygon options: {fillOpacity: 0.1, fillcolor: 'blue', strokeWeight: 0.1}}, {where:" Co...

javascript - HighCharts reading from CSV basic example -

New in high writing and JS and am trying to plot data from a CSV file (data3.csv) . At this time the code is: gt; Top & gt; Meta http-equiv =" content-type "content =" text / html; Charset = UTF-8 "& gt; Title & gt; Example of Heights & lt; / title & gt; & lt ;! - 1. Add these JavaScript Inversions to the top of your page - & gt; & Lt ; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> gt; & lt; / script & gt; Lt; script type = "text / javascript" src = "highcharts.js" & gt; & lt; / script & gt; & lt;! - [if IE]> gt; script type = "text / javascript "Src =" ../JS/ excanvas.compiled.js "> & lt; [endif] - & gt; & lt ;! 2. Document Ready To start the chart, add javascript -> gt; script type = "text / javascript" & gt; $ {document} .ready (function ()...

php - MySQL Query on Wordpress database -

"postprint" itemprop = "text"> I'de post like a WordPress database that likes to take a mysql query on the title and recovery of the first image link of the last 6. WordPress Core Functions are not allowed because I want to show them on an external site. In other words, I need a pure mysql query I can not show titles like this:. $ result = mysql_query ("where wp_posts select from * Post_status = 'publish' and post_type = 'id_listing' order ID range range 6", $ db); While ($ record = mysql_fetch_assoc ($ result)) {echo '& lt; Li & gt; $ Record ['POST_TITLE'] .. "& Lt; / li & gt;"; } But how to recover the first image (if present) related to these posts? In the wp_posts table for your image record, what post_perrent is on the published page? Not mine, and if you do not have it, you will need to search through the Post_saint field for each published page, from which you can search...

python - two y axis with same scale -

I did a histogram with two y-axis and two datasets, but I did not set the two y-axis scales In this example, there will be two aspects of this idea from 0 to 25,000. Do anyone have the idea of ​​this matter? Have you tried something like this: . .. ax2 = ax1.twiny () a, b = 0,25000 axis 1.set_illim (a, b) ax2.set_ylim (a, b)

html - SEO for imaged typography -

Since fonts rendering is a nightmare on cross platforms (i.e. windows have very ugly allies, and TTF fonts are not anti-aliases. All) I came up with the idea of ​​creating a png file for every title in my design. My question is if I make an H1 HTML element and hide it with CSS, while the title will be shown through a PGG image, will it work around this engine? What you are offering is a very common method of replacing text with an image No matter the search engine. I suggest that instead of hiding the element, take it off-screen, -5000px or so, in addition to that, your users will probably hate you because your site Will slow down This is because it is best to deal with just typography. I do not know which Windows system you use, but anti-aliasing works fine on all my windows box. If you need a different font, consider web fonts.

What does [:-1] mean/do in python? -

इस सवाल का पहले से ही एक उत्तर है: 23 उत्तर अजगर असाइनमेंट पर कार्य करना और के रूप में उत्सुक था कि [: -1] निम्न कोड के संदर्भ में है: निर्देश = f.readline () [: - 1] यहां पर खोज की है इसलिए और Google पर लेकिन कोई फायदा नहीं हुआ एक स्पष्टीकरण पसंद आएगा! यह अंतिम वर्ण को छोड़ने के लिए स्ट्रिंग को स्लाइस देता है, इस मामले में एक नया वर्ण : & gt; & gt; & gt; 'Test \ n' [: - 1] 'test' चूंकि यह रिक्त स्ट्रिंग पर भी काम करता है, यह अंतिम वर्ण को हटाने का एक बहुत ही सुरक्षित तरीका है, यदि वर्तमान: & gt; & gt; & gt; '' [: -1] '' यह किसी भी क्रम पर काम करता है, न सिर्फ तार।

c# - ReadLine issues -

I need to create a console application in C # which will take numbers and lines X any number xxxx-xx-xxxxxx or 4 numbers, row, 2 numbers, row, 6 number The suggested user input and confirm that the user has not entered the integer at the right places and has not replaced the rows. I want to put it in a format so that the user has to write the lines themselves. I think the lines are automatically inserted, so users do not want to take them, the length of the string is also always the same. (0-13 or 14 characters) Can it be done in any simple way? edit : I wrote and added the code instead, instead it has to be all here) This code takes string input and ensures That no invalid characters were entered, in other words it works, but I want to give the place to the program '-' where they should be done automatically in any way and it will also be good that you To limit the number of (14 to lake , Including lines). My primary point is that '-' should be...

Scala Play Framework 2.1 Slick 1.0 Cake Pattern Common Table Fields -

I am working on a project that uses Slim 1.0 and the cake to connect to a PostGrascul database Pattern All right, everything looks fine, but I have a lot of applause and I think that there are many common columns which are in all tables I would like to be able to create an attribute in the common field, but I do not understand this Coming out how it works. (I am fairly new in Scala, but I think the basics below are well below.) Here's an example that expects what I want to do: one .scala: package models.db.slick import java.util.UUID import play.api.db.slick.Profile case class one (normal 1: uuid, normal2 : String, exclusive 1: string) attribute OneComponent {it: profile = & gt; Increase the table [one] ("one") with the import object.simple._ object object commoncolor {DRF exclusive 1 = column [string] ("exclusive 1") df * = common 1 ~ common 2 ~ exclusive 1 ; & Gt; (One.apply _, One.unapply _)}} column column. Scala: package model. Db.s...

c# - How do I avoid 'Object reference not set to an instance of an object'? -

I keep pressing the same problem over and over again, and I have done it again. I wrote a line of code: int laid = db.GetLAByLatLong (address.litidu, address.alogya); ... and there is no problem with the line in Visual Studio. But when I run the code, it reports: The object reference is not set for an example of an object What am I doing wrong? How does the Visual Studio code feel right, but does it report an error in the runtime? I am doing a lot of this and I will be very happy to understand what I am doing, so I can save it. You have two objects in your code: db and address You are referring to both the objects in the code shown. At least one of them is empty. To avoid this problem, make sure that you have started both the objects before the code is run. You can also add a check like if (DB == empty) throw a new exception ("variable DB is empty");

datetime - PHP Timezone Conversion / PHP Date not displaying correct timezone -

The default timezone for my server and MySQL database is set in GMT. My PHP code converts on the date that the user's local Timezone (formerly in this case) is displayed: $ OPENED_DATE = '2013-03-20 21:05:00' $ OPENED_DATE = new date time ($ OPENED_DATE); $ OPENED_DATE- & gt; Settimejone (new dated timezone ('America / New York')); Then I will produce a date for the user: $ OPENED_DATE = Stratom ($ OPENED_DATE-> format ('Ymd H: i : S ')); $ OPENED_DATE = Date ('FJ, Y G: IAT', $ OPENED_DATE); Output of $ OPENED_DATE: March 20, 2013 5:05 PM GMT Actual time is displayed correctly but 'T' in 'Output' is still displaying GMT. Is there a way to do this that we display GMT default not to change the timezone? The only way to get me to do this is to use date_default_timezone_set to switch to user's timezone , Then go back to GMT but I think that should be done in a more efficient way ... Thank you! These two lin...

Lisp cyclic lists -

We have been given homework indefinitely where I need to use the "cyclic" list (I do not know if the right What is naming for this) In the "cyclical" list, I mean the list, where the previous code of a previous cdr indicates the first one from the same list. (Value1. PointerValue2) (Value2. PointerValue3) (Value3. PointerValue1) We have been taught to create such lists in this way: (defun cykl (l) (setf (cdr) (last L)) I LISP software ( lispabax ) Does not support such lists. I also tried clisp on Debian, but after creating such a list it has crashed. Did you know that it supports (freeware, OS Free)? All Lisp implementation, which includes support for clisp . When you say "crash", you probably mean one (or an out-of-memory era), which you should always print ('read-up- Print 'try to remember the loop)?) Is a circular structure when is zero . Setting t forces to use this notation: [1] & gt; (DefEfermeter L...

ProgressBar.setProgressDrawable not working for Android 2.3 -

I am currently working with dynamically updated ProgressBar . Through a few percentages, the prawnsbar sets the color of a different color. Currently we have various color clips defined in drawable XML. The one entitled progressbar_blue_states is as detailed: & Lt; / Item & gt; & Lt; / Layer-list & gt; Whenever we need to update the dialog, we call the following code:. progressBar.setProgressDrawable (getResources () getDrawable (R.drawable.progressbar_blue_states)); However, it does not only update the progress bar, but it completely takes the progress bar out where the white space is left anywhere. However, if I set android: progressDrawable = "@ drawable / progressbar_blue_states" are in XML and carry this call setProgressDrawable () , it loads correctly. We need setprogressDrawable to update the colors as needed. This call works fine in Android 4.0+, but in Android 2.3 we are running in some trouble. Any ideas? Edit In this w...

c++ - How to read characters from a file and store them into an array? -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक मैं एक फ़ाइल से पढ़ता हूं और उन्हें सरणी में संग्रहित करता हूं। बस बताइए कि मैं स्ट्रिंग माइकल से मेरे inputFile : पूर्णांक सीमा = 7; (इंट संख्या = 0; संख्या & lt; सीमा; संख्या ++) {inputFile & gt; & gt; stepc_char; Cout & lt; & lt; Stepc_char & lt; & lt; endl; } मैं उन्हें एक सरणी में संग्रहीत करना चाहता हूँ। मैं यह कैसे कर सकता हूं? (ध्यान दें कि मैं std :: vector ) तब मैं उन्हें एक सरणी में संग्रहित करना चाहता हूं ठीक है, वर्तमान कोड पहले से ही सही ढंग से पढ़ा है मानों को सरणी में संग्रहीत करने के लिए: // (अपने कोड में न्यूनतम परिवर्तन के साथ) char * my_array = new char [limit]; (इंट संख्या = 0; संख्या & lt; सीमा; संख्या ++) {inputFile & gt; & gt; stepc_char; Cout & lt; & lt; Stepc_char & lt; & lt; endl; My_array [number] = stepc_char; } को भूलना मत भूलना my_array; जब आप इसके साथ हालांकि किया हो एकमात्र कारण मैं char my_array [limit]...

html - Making a progress bar from a javascript counter -

I have a JavaScript function which takes time from the function. It starts from 00:00 like a counter and goes on a certain time. With a button the timer can be stopped / resumed and it works fine. The javascript function has passed time and total time! Now I have two csss: # seek-bg and #search-bar I search horizontal on BG Want to find out what it is possible to do without jquery? How do I connect timers and these CSS? Code! # seek-bg {height: 3px; Background color: black; Width: 100px; Status: Relative; } #Search-bar {background color: white; Width: 4px; Height: 3px; } I want to take the search-bg horizontally. Is it possible to do without jquery? Yes it is possible. Take a look at the HTML5 progress bar: & lt; Progress value = "10" max = "100" & gt; & Lt; / Progress & gt;

bash - Sharing header file between a C program and a shell script -

How do I share a C header file with a shell script? Communicates with C program through pipelines called shell script. Suppose that enum SAMPLE_ONE, which is defined in the C header file, pipe written by the C program. Shell script reads the value of enum from the pipe. What is a way to share the header file between the C programs and shell scripts - in such a way that I only need to update the header file once and do not have to write the same header string in the shell script? See the following example: $ cat foo.h #define ENUM enum #define COMMA, ENUM foo_t {FOO_VALUE1 = 11 COMMA FOO_VALUE2 = 22 COMMA FOO_VALUE3 = 33}; Include $ cat foo.c # & lt; Stdio.h & gt; #include "foo.h" # print_enum (x) printf ("% s =% d \ n", #x, x) int main () {enum foo_t foo = FOO_VALUE1; Print_enum (FOO_VALUE1); Print_enum (FOO_VALUE2); Print_enum (FOO_VALUE3); Return 0; } $ Cat foo.sh #! / Bin / bash shopt -s extension_allies alias ENUM = 'true' alias COM...

gem - How to select with version of Zurb Foundation to use for a CodeKit + Compass + Sass Project -

I was hoping to use the new version of the Foundation (v4) for a responsive project, so I installed v4 Installing the gem on the second day, and getting the codekit running with it. However, my client has said that we support IE8 (God help me) because we still have an important part of the traffic shown in the analytics. The version 4 of the Foundation does not support IE8 because its mobile-first. V3 works differently and can still support IE8 So I'm trying to figure out how to bring the track back. I have installed the latest code through the V3 Foundation GEM through the gem installed zurb-foundation -v 3.2.5 , but I'm not sure how the codekit + compass used to use V3 instead of V4 Is forced to In addition, when I established my new project with V4, I had created a Compass project in CodeKit and then through the terminal the command to build the foundation structure in the new compass project folder Was followed: 1. Add the requirement of "zurb-foundation...

apache pig - Pig Round Decimal to Two Places -

How do I score a float data type in 2 decimal places in Apache Pig? For example: test = FOREACH (Joy Load By (OP 1, OP 2), Load 2 by (OP, OP4)) Load 2: : Number 2 * Load :: Number 1 as output Field numbers 1 and number 2 are floats. My current calculation gives me 5 to 6 decimal places. Try it out: B = FOREACH A GENERATE ((( AM Flat 1 * AM Flat 2) * 100 F) Round) / 100 F AS IFLOT 3

Html CSS - Apply style to all elements inside a class? -

I have a strange situation, I have a table, I have AJAX form in every line. I form is not allowed in tr , but it is allowed in td . So I had to keep all the columns inside a td and manually match the size of bureaucracy. The problem is the padding and margin that combines the HtmlHelpers (ASP.Net MVC Razor), causing the content to not be aligned under the correct header column. I need to write a CSS that can do all the margins and the padding of all the items within any class. Or is there an easy way to align the content under the headline? & lt; Table style = "width: 100%" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th style = "width: 5%" & gt; Id & lt; / Th & gt; & Lt; Th style = "width: 35%" & gt; Content & lt; / Th & gt; & Lt; Th style = "width: 60%" & gt; Details & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody &...

How to transpose a matrix without MATLAB's transpose tool -

I have an image that I have listed as a matrix. I want to transfer that image and then I want to display the image on the screen. I would like to know how to do it "difficult" way, that is, without using MATLAB infection. function [b] = trans (a) [rc] = size (a); B = zero (C, R); For I = 1: R = C for J = 1: cb (j, i) = a (i, j) end and end

wavelet - Matlab DWT H-level -

I'm trying to apply some watermarking algorithms found in a paper 1 . This is a line of paper: H-Level DWT for all the randomized segments. Then in the simulation section the author is used for wavelet experiments. DWT transforms the normal wavelet "debbeeze-1" and the level H = 3. What I just do not get is H, how do I input H = 3 into matlab DWT function? My real code is: [ca, cd] = dwt (audio, 'db3'); Can anyone help me? 1 Yes, y. End Kim, J. Based on a quantified audio watermarking algorithm DWT-DCT . Multimedia, Computer Graphics and Broadcasting 33 9 ¢ 344 (2011) 1 . Question: "What does h (level) mean?" A: Tells this concept well, but I try to summarize, data for each level (original data for level 1, approximation data from other level) The approximation and detailed data has been broken down. The result is the coefficient that describes the different data. 2. Q: How can I input H = 3 into the matlab DW...

asp.net - Incorrect syntax near ',' while using update query -

The following is my code. I have used the class in my website. But I got "wrong syntax pass", "... anyone can tell me what is wrong with the code .. secure zero btnadd_Click (object sender, EventArgs e) { S1 = "updated tckt_tbl set class = '" + ddlclass.Text + "', dist =" + lbldist.Text + ", no_of_adults =" + ddladults.Text + ", no_of_senior =" + ddlsenior.Text + ", n1 = '"+ Txtn1.Text +"', '; S1 + = "n2 = '" + txtn2.Text + "', n3 = '" + txtn3.Text + "', n4 = '" + txtn4.Text + "', n5 = '" + txtn5.Text + " ', N6 =' "+ txtn6.Text +" ','; S1 + = "ag1 =" + txtag1.Text + ", ag2 =" + txtag2.Text + ", ag3 =" + txtag3.Text + ", AG4 = "+ txtag4.Text +", ag5 = "+ txtag5" text + ", ag 6 =" + tantataga 6 Text ","; S1 + = "gen1...

batch file - Almost there... Need to find and replace. Using for loop -

I am trying to find and replace. I'm using one for loop, I'm learning, but I'm almost there. I have tried to find the answer but the formulas are very misleading to me. Delim is an empty space and as you can tell that I'm leaving 4 lines and the second is token. I have been replaced by the place var5a where I need it backwards, as I %% F Requires the same var5a , not the other way (as I've just written down). But do not know how to write please tell me how to do it. I & lt; & Lt; Tried to use =, but no fate. for skip = 4 tokens = 2 delims = "%% F in (script.vbs) (Set Var5a =! Var5a! %% F) I'm learning please be kind. @ECHO OFF SETLOCAL :: Replace the file with line 5 of the token 2 (location Replace different): Assume that the file exists, etc. And no line started "SET" replacement = this replacement text del newfile.txt 2 & gt; Nul FOR / f "token = 1 * delims =:" %% i IN ('findstr / n / r "$...

debugging - working effectively with gdb -

Whenever possible, I usually like to learn keyboard shortcuts. Experienced encoder effectively works effectively in the sixth one. It's really amazing to see that I'm trying to debug GDB for a while, instead of GPB debugger (on GDB basis) and me It still seems difficult to navigate through the code, observe the variable, etc. Actually, I've never experienced a GDB user, so I'm thinking ... is it worth it? Is it possible to work effectively with gdb? Note: I also tried CGDB, which is a curse expansion of GDB. It's better, but I still think that its still not effective ... GDB is a curses interface, which The command line can be activated by option-tui This interface has a single key mode, which provides the most common operation with a single keystroke. If additional you use automatic command execution, to display the variable value, when a breakpoint arrives, it is as comfortable and quick as it is. But if you use Eclipse anyway, then I have no point in avo...

c - How might I compare this variable so that I can use it in a switch statement? -

I just want to allow string or integer input, but I can not find it, this is what I have Is yet .. #include & lt; String.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Limits.h & gt; # Include & lt; Ctype.h & gt; # Include & lt; Stdlib.h & gt; #define maxL 9182 int main () {char menuOption; Four CMDs [10]; // The functions of the board are used in the float circle () {float no; Float calflot; Printf ("\ n \ nYou have selected a circle! \ N \ n"); Printf ("Enter value between 1.00 and 1000.00" :); Scanf ("% f% * c", & amp; calcflo); Printf ("You have entered% F \ n", Calphlot); Numbers = 2 * Calculus * 3.14159; Printf ("The circumference of your circle is:% f \ n \ n \ n", numbers); } Float area () {float area; Float calcefire; Printf ("\ n \ nYou have selected an area! \ N \ n"); Printf ("Enter value between 10.5 and 1024.00"); Scanf ("% ch% * c", ...

javascript - How do I disable vertical scrolling in iOS using Hammer.js? -

I am trying to disable vertical scrolling in iOS with Hammer.js (jQuery version) in a horizontal scrolling list . I have tried to: $ (document) .hmer (). On ('swipe, drag', 'body', function (event) {if (event.direction == hammer .DIRECTION_UP} event.direction == hammer. DIRECTION_DOWN} {event.preventDefault ();}}); But if it does not work, how can I disable the scroll vertically while still horizontally scrolling? I have it on ("swipe drag", function (event) {event.ggure.}. ( For example, "swipe drag"). PreventDefault (); if (event.type == "swipe") {swipeAction (event);} and {drag action (event);}}); Here [edit] My answer was simply to tell you that you were using the wrong incident . ForeventDefault () In fact, you used the wrong syntax to check the direction of the event. You should be able to manage it in such a way that I have not tested it: $ (document) .hmer ({drag_lock_to_axis: true}). On ("swipe drag...

android - Is it possible to use one allocation for a chain of renderscript actions? -

For example, I do it) to allocate a bitmap, then aplly brightnessContrastRs (and then something different with the same implementation create filters that allocation, but replaced by brightnessContrastRs () action? public bitmap brightnessContrastRs (bitmap bmIn, integer brightness, contrast integer) {bitmap bmOut = Bitmap.createBitmap (bmIn.getWidth () , bmIn. GetHeight (), Bimin Confif .get ()); allocation allocation; allocIn = Allocation.createFromBitmap (Rs, bmIn, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); Distribution AllocOut = Allocation. Cut (RS, allocIn.getType ()); scriptCBrightnessContrast.set_in (allocIn); allocIn.destroy (); scriptCBrightnessContrast.set_out (allocOut); scriptCBrightnessContrast.set_script (scriptCBrightnessContrast); Float row Contrast = (( 100.0 F + Contrast) * (100.0 F + Contrast) / 10000.0F); Float Row Brightness = Brightness / 255.F; scriptCBrightnessContrast.set_rowBrightness (rowBrightness); ScriptCBrightnessContrast.set_...

Android Push Notification - Google Play -

I've integrated push notifications using GCM in my Android app. It's working fine now I'm on Google Play Am uploading my app Do I need to change anything on my push notification settings to upload to Google Play? No, you do not have to change anything if it is working on your testing area. Production will also work in Google Play ...

css - How can I not show divs(sidebars) when site is in mobile viewport -

I have 2 sidebar on my site. Using the viewport I have the responsive CSS but when I open the site in a mobile browser So I do not want to show the sidebar. Do I have to fix the tab? Is there any way I can do that? For example: Stack Overflow When you open it in Mobile, you do not see the sidebar I want something like this. Thank you in advance: You can add Media queries can only be defined: @ media only screen and (minimum-device-width: 320px) and (max-device-width: 480px) {/ * styles * /}> Read more at

mysql - Getting SQL syntax error in INSERT query in wordpress database -

I'm using insert query down to enter a custom name for all WordPress post, but SQL syntax error is wp_postmeta (post_id, meta_key, meta_value) select ID inserted as post_id, meta_key as' CustomField '' MyValue not where ID wp_posts as meta_value (from wp_postmeta Where meta_key = post_id select 'CustomField') and 'post_type =' post '; You touch a comma for a single quote to isolate the column and wrap the string . (post_id, meta_key, meta_value) Select putting wp_postmeta ID post_id, 'CustomField' as as meta_key, 'MyValue' meta_value as no where id wp_posts (wp_postmeta Where meta_key = select 'post_id' from 'CustomField') and post_type = 'post'; not An alternative to using joining two tables, insert wp_postmeta (post_id, meta_key , meta_value) join a.ID selection post_id, 'CustomField' as as meta_key, 'MyValue as meta_value from wp_posts' a left a.ID = b.post_id and b.me...

c++ - Memory leaks testing -

I am testing memory leaks for our product with the device std: The string or std :: auto_ptr objects leaks are detected. As I know, these two types of objects will leave themselves. I am thinking that they are actually leaking or just because I have closed the recording very quickly and the devices have not been detected that they are released gone? Are Instruments Right on These Types of Items? You can leak objects to std :: string and this is very difficult Not: int main () {std :: string * s = new std :: string (); Return 0; } In the same way you can leak a auto_ptr . A std :: string will skip the dynamically assigned string array, but it will not release itself .

Machine Learning classifier AdaBoost for C# -

Is there a popular and stable library in C # for AdaBoost algorithms? Are there different types of enhancements in addition to classic adobe (such as Gentlebost, Logitbost, etc) in such a library? Supports basic flavors of AdaBoost (discrete, real, logit and soft) This library supports C / In C ++, you can use C # wrapper, although the API is more limited (primarily by train () and predict () methods) from C / C ++. You can also use but I have not done it yet.

c# - Does the order of EF linq query clauses influence performance? -

Should I worry about the order of the unit framework linq query clauses in terms of functioning? In the example below can change the order of two, where there is an effect on DB lookup? By using (var context = new ModelContext ()) {Var fetchedImages = (Include images from images in the context ("image") where the images are typed.Elloles (" JPG ") where images. Imagesoros.id ==5 select images) .ORA (); } No, changing both of these where Generated SQL will look like this anyway: where [condition1] and [condition2] In addition to this, you agree with the logical operators You can write: where the images. Type. Ecloss ("jpg") & amp; Amp; Images.ImageSource.Id == 5

PrivatePub is not defined error Rails 3.2 private pub -

मैं अपने रेल आवेदन में निजी पब मणि का उपयोग करना चाहता हूं। सर्वर: "http://0.0.0.0:9292/faye" secret_token: "गुप्त" परीक्षण: सर्वर: "http://0.0.0.0:9292/faye" secret_token: "गुप्त" उत्पादन: सर्वर: "http: / /0.0.0.0/faye "secret_token:" 98ec77eb7077c9899dc53f003abc4d6a0170512a57feab126ed5a32b114e3613 "signature_expiration: 3600 # एक घंटे मेरी private_pub.ru फ़ाइल के साथ # रन: rackup private_pub .ru -s पतली -E उत्पादन की आवश्यकता होती है "बंडलर / सेटअप" की आवश्यकता होती है "YAML" "फेय" की आवश्यकता होती है की आवश्यकता होती है "private_pub" फेय :: WebSocket.load_adapter ( 'पतली') PrivatePub.load_config (File.expand_path ( "../ config /private_pub.yml ", __FILE__), ENV [" RAILS_ENV "] ||" विकास ") PrivatePub.faye_app फेय :: Logging.log_level = चलाएँ: डिबग Faye.logger = लैम्ब्डा {| मीटर | Puts m} मेरी अनुक्रमणिका फ़ाइल & lt; ...

call - Get number as dialed in the native dialer of android -

Can I get the number entered in the user's dialer on the run? I enter programmatically in the original dialer, so I want to get points one by one? I got the answer. You can not get key events from the original dialer because it will create a serious security problem and the dialer can easily spy.

android - Why I can't show image inside custom dialog? -

I want to make some kind of logging process in my Android app. I have figured out how the user is pressing (three times) on the screen and creating logging sequence from it. Finally, I want to show 3 images that represent the selected logging sequence (from my dosing folder) I have set dynamically a drable ID and when I place an image on the main layout, Works. But if I put an image inside a custom dialogue, then I get the strength. From LogCat I see the following: at java.lang.NullPointerException image1.setImageResource (iIdSlike); If I show drawable identification letters as a text it is ok image1.setImageResource (free and only on ID main and custom dialog layout I got the force even though I established the image (not dynamic) like .drawable.s11); Why can not I show an image on custom dialogue? This is my dijalog.xml (custom dialog layout): & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout xmlns: and...

parsing - Avoiding loop when at run-time parse a javascript code -

I can javascript code in a user text area when I realized the JavaScript parser in a web page like: var i = 0; I ++; Var y = i * 10; Document.write (y); Some output is parsed for generating (for example, document. Written stream, and so on). When the textarea change event occurs parsing the function occurs. function pars (text) {try {.... eval (text); } Hold (e) {.... return {status: wrong, output: ..., ...: ...}; } Return {Status: true, Output: ...., ...: ...}; } Everything works well, but I have a problem when a user types a loop in the text area (e.g., for (var i = 0; i & Lt; 10;) , while (true) ) because the application goes into the loop. To avoid this problem, I will ask you some questions / solutions for this problem: Are there some JavaScript libraries or functions that eval allow a javascript code but loop-free? Can I ask for a certain time to execute my parse function? After such a time, I will create an exception that prevents the Evil Fu...

css - sass how to instantiate an empty variable to be set by @if -

I think that the code speaks for itself so I have: @ Micsin BtnNoBackgr30 ($ divName, $ icon name, $ xtype yesOrNo) {$ xtypebtn: zero; @if xtypeYesOrNo == 'yes' {$ xtypeBtn: x-button - # {$ divName}; } @if xtypeYesOrNo == 'No' {$ xtypeBtn: # {$ divName}; }. # {$ XtypeBtn} {Quality: Value; } I am getting into CSS all this .nil {properties: values; } How can instantize the variable outside the @ variable? If I can help it within @if'm so normal programming and marked ans 'undefined' such scope will not be searched out Please make false bumps and taps giving me errors $ xx_btn anything to random default value because it will be reset anyway? If $ xtype yesOrNo can be undefined, then give it a default value too? @mixin btnNoBackgr30 ($ divName, $ iconName, $ xtype yesOrNo: default) {$ xtypebtn: default; @if $ xtyYesOrNo! = Default {// do anything} @if xtype yesOrNo == Yes {$ xtypeBtn: x-button - # {$ divName}; } @if xtypeYesOrNo == no {...

python 3.x - AttributeError: 'numpy.ndarray' object has no attribute '_hold' -

I am using numpy and matplotlib in Python 3. An error is occurring in the following code: import matplotlib.backends.backend_qt4agg import matplotlib import matplotlib.figure Imagery from importCan import as imagePaint and contact. Figure 2: Matplotlib.axes import matlotlib from import pylab to plpl as subplot = [1,1] b = [1,1] fsam = 48000 w, h = freqz (b, a, worn = 2000) plt.plot (( (Fsam-8000) * 0.5 / np.pi) * w, abs (h), label = "") Actual error with matplotlib 1.3.x: file "/usr/local/lib/python3.2/dist-packages/matplotlib-1.3.x-py3.2-linux-x86_64.egg / matplotlib / axes.py", line 4119, if No self._hold: attribute: error: 'numpy.ndarray' object has no attribute '_hold' Real error with Matplotlib 1.2.0: Traceback (most recent call final): File "/ home / christoph / audio_measurement / A UdioTools / AudioTools.py ", line 222, & lt; Module & gt; Main () file "/home/christoph/audio_measurement/AudioTools/Aud...

Nested pattern matching in Ocaml -

Want to write a function in the Okmail, which is given a list of quadruple and quadruple (x, y, z, f) I RCRR interrupted = match with BC = S. [] - & gt; [] | HD :: TL - & gt; Start starting in cell (x, y, r, _) = c (* warning *). Cell (X, _, _, some (_)) - & gt; HD :: Compulsive Cil | Cells (_, y, _, few (_)) - & gt; HD :: Compulsive Cil | Cells (_, _, r, some (_)) - & gt; HD :: Compulsive Cil | _ - & gt; Constrained_by c tl end end Problem: When it is called, it gives the original list, no matter what the quadruple we match, the problem warns that X, Y, RR ( warning ) is unused As Jian said The good news is that the guards are resolved to your problem. The code can be close to your written specification: RCR interrupted (by, x, y, z, _) C As c) list = match list | [] - & gt; [] | ('X', 'y', 'z', _) as C '): TL when x = x' or y = y 'or z = z' - & gt; C ':: constrained_by c tl | HD :: TL - &...

java - Why is there a difference in values when I am reading from oracle DB and storing the retrieved number in a string. -

Why is the difference in values ​​when reading the column value from Oracle DB (stored in float data type in DB) I It is difficult to give you an accurate answer because you have not shared any code with us though I believe That's the same value in DB and in the string. Simply use the device that you are using to view data in DB formats and perhaps remove the tail, so that you will not see the last 2 characters 02 .

random - In php how would I generate a fixed number from a string within a certain value range -

Suppose I have a database of 100,000 or less random string and I want to generate a number from 1 and 1 in each string. 500 My method should always generate the same number (given to the same string) and it should also be a distribution of numbers from 1 to 500. Any thoughts? It seems that you need a hashing function, you can use and: echo (crc32 ("hello world"))% 500 + 1;

sql - Assign value of a column in a table as columname of another table -

I have a parent table SalType and Saltype_name Is the column name Another table StaffSal that SalType foreign key relationship with the StaffSal I enter values ​​for each SalType_name table structure like this Saltaip --table 1 Ss_aid Saltaip_nam 1 Basic 2 HRA 3 DA StaffSal --table2 SV_id SS_id SV_value U_id 2 1 15000 11 3 2 0.1 11 4 3 0.75 11 5 1 10000 12 6 2 0.01 12 7 3 0.5 12 I have to show this way U_id Basic HRA DA ... 11 15000 1.75 12 10000.01.5 Can anyone help? There are several ways that you can convert data from rows to columns. A PIVOT function in SQL Server that can be applied to rotate the data If you have a limited number of values ​​that you call columns You can hardly query: SRC Pivot for saltype_name in u_id, Basic, HRA, DA (Original, HRA, DA), select (max ( Sv_value)), excluding STOTP, except STOTP, name, SU_ID, SS_View, excluding PIV (TS_ID = s.ss_id); But if you have unknown numbers, then you want to apply dynamic SQL to...

Is there any difference between these oracle queries? -

मेरे पास दो oracle queries हैं 1) sysdate + 7 और sysdate के बीच बनाए गए डीडीटी 2) sysdate और sysdate + 7 के बीच बनाए गए डीडीटी क्या यह दो क्वेरी एक ही परिणाम देगा ?? पहले कभी भी कोई पंक्तियां नहीं लौटेंगी आप के बीच में विचार कर सकते हैं, जहां ए और बी के बीच का कॉल समान होना चाहिए जहां कोलेटी = = ए और कॉल एंड लेफ्टिनम; = बी तो आपका पहला कोई अयोग्य है क्योंकि created_dt> gt; = sysdate +7 और निर्मित_ डीटी & lt; = sysdate दोनों स्थितियां कभी भी सत्य नहीं हो सकती हैं।

jruby - do AST stays at runtime when jrubyc compilation were used? -

is the ruby2ruby compiler, which can restore Ruby code from AST. I'm curious, if I compile my code with jrubyc, then whoever can evaluate my code inside my running app, he will get AST in my Ruby classes and then Ruby 2 Is it possible to restore the ruby ​​code with RBI? I am using jruby 1.6.5 in Ruby 1.8 compatibility mode. As much as I can tell, AST is actually present in any form in the compiled class file, And therefore, at least it is theoretically unbelievable code to run in the same JVM example. In practice, it is probably true that a Java Decompiler can produce similar results similarly.

java - Adding array of JRadioButtons with variable length to a JWindow -

Hi All I was trying to add an array of variable length to JWindow but I'm getting a run time error. Get help from here .. Here's my code: package element; Import java.util.Calendar; Public class extended up to javax.swing.JWindow {Public Foladi () {initComponents (); } Private Zero initComponents () {int i; // To get the number of days of the current month Calendar cal = calendar.justinstance (); Integer = max. (Calendar DAY_OF_MONTH); GetContentPane () SetLayout (new Java.att.flowout ()); // Creating any size Rediobuton equal time to present (i = 0; i & lt; maxdays; i ++) {jRadioButton [maxdays] = new javax.swing.JRadioButton (); . GetContentPane () add (jRadioButton [i]); } Pack (); } Public static zero main (string exits []) {Java.ew.quintacuyue.acquelkiller (new runnabl) (public zero-less) (new flowery ()) setwub (true);}}); } Private javax.swing.JRadioButton jRadioButton []; } But what I get error is: exception in thread "AWT-EventQueue-0" java.lan...

python - Tower of Hanoi with adjacent restriction -

Resolved with impending restriction. I tried to look around but I could not find any clue. What have I tried so far: DH Hanoi (N, Source, Helper, Target): Printed "Hanoi [0]: If the source [0] [- 1] is called, "Source, Assistant, Goal," if for the "source" if n & gt; 0: Hanoi (N-1, Source, Assistant, Goal) == 1: Move (source, subsidiary) go (assistant, goal) Second: go to Hanoi (N-1, target, assistant, source) (source, assistant) Hanoi (N-1, Assistant, Goal, Source) Hanoi (N-1, Source, Assistant, Target) Def L (S, D): Disk = s [0] .pop () print "moving" + ar (disk) + ["]" from [1] + "to" + d [1] d [0]. Target = ([], "source") target = ([], "target") helper = ([], "helper") Hanoi (lane (source [0]), source, assistant , Target) which only works for 2 discs. Thanks I got this good math description a verbose implementation At first glance it seems as if you had to distinguish the c...

Google maps sdk callout issue ios6 -

I'm using googlemap sdk for iOS 6 in my project. I'm facing the problem of marker option With GMSmarker Options * London Option = [[GMS Marker Option Alok] Init]; LondonOptions.position = CLLocationCoordinate2DMake (51.500, -0.127); LondonOptions.title = Zero; LondonOptions.snippet = Zero; [MapView_ addMarkerWithOptions: London Options]; Google states that if I set the title and snippet to zero, the marker will not show a callout, if I tap it. But this is a callout > I worked around it by returning an empty UIview :) But as a shared part, it is now fixed

Redirecting form to another controller in spring mvc -

I am using Spring MVC. Here I used JSP as a scene. I have a condition I have used & lt; C: I am subject to another controller, which is subject to another controller, url = "updatestock.IC? Api = '$ {mineral select.appsense id}' and service id = '$ {mineral select science id} 'And mineralid and nm =' $ {minerallist.jet (0). Mineral id}: $ {mineral list .get (0) .mineralName} '/' gt; But it is executed, but the page is not provided. But there is no exception page in the console. Since I did not find an answer to my comment, I try to give you the best answer with limited knowledge I'll do that, maybe I can. First of all, I think that this is bad behavior for redirecting your JSP. To be honest, I think that in addition to simple loop and decision branches in its JPS, its bad habit is. I consider the decision to redirect a "business logic" decision, and the one I am not in my JSP. Spring MVC provides several ways to do...

getting started with jquery datepicker -

I'm learning web programming and now I stuck with the jquery datepicker. Display the jquery datepicker Use Get user input But I get all these " How to modify it (with CSS) ". I need to get started with another startup tutorial (IM just type with jquery and AJAX , but I know standard javascript ) Thank you for your help: D You need the input field and then add jQuery Drepeanker method: & lt; By calling the input type = "text" id = "datepicker" /> and the datepicers; & Lt; Script & gt; $ (Function () {$ ("# date picture"). DatePicker ();}); & Lt; / Script & gt; $ (Function () {} indicates that it will call the the delimiter method and in the HTML input control code Duplicator has once been loaded DOM .

xpages - ExtLib, iNotes List View: how can I access data selected in the view from the outside? -

Using firebug, I found that the iNotes list view object is called "getSelectedData ()", a function that is distributed like an array of selected entries (see item specific row data such as the "ext" element described by each polyster In this way, using one of the internal events of the list view (like "oncontumentman menu"), I can recover the selected data and I can keep them somewhere else. That's just great! But, as I have never got the content, I now use the outside (like using a button) object of the list view To reach the selected data collection in the same or similar way. But whatever I try, I do not seem to get the right thing outside the list view. dojo.byId ("# {id: listView1}") is giving me an object, but without those specific methods Which i need Any hint? Greetings, Lothar I think I have solved it, I am close to tomorrow, but instead of dijit .byId has prevented it from working by using dojo .byId: ...

c# - MVC3 Count of checked Checkboxes -

Image
In my view, I want to see the check check box count in an editor field! How can I keep my request? Controller: How do I change that controller? // create public actions () {Return View (); } // // Post: / project / create [hppost] create public action roles (PPM_ Project project) {if (ModelState.IsValid) {db.Project.Add (project); Db.SaveChanges (); Return Redirect Action ("Index"); } ViewBag.Status = new selection list (new string [] {"----------", "running", "hold", "end", "did not start", "cancel"} ); See return (project); } See: What's the change in the scene? & lt; Div class = "editor-label-AI" & gt; @html Labelfire (model => model enzahoglotrophinebiu annehtenen) & lt; / Div & gt; & Lt; Div class = "editor-field-AZB" & gt; @html Editor (Model = & gt; Model.Azahl_bprprofin_unhighten) @html Validity message (Model = & gt; Model. Enzahlog At...

scripting - How to backup and restore IIS configuration from script -

I am writing a script that sets many different applications in Windows (mainly for SVN and open source servers) For http, DNS, mail, FTP and DB). This script is intended for new developers to execute in new / clean Windows workstations, it automatically sets to set each output to create a product after executing it, everything runs locally And the developer can start working immediately. This not only helps new developers, but whenever all existing developers change the whole system, everything is replicated locally. One thing that I still can not do, is making a backup of an IIS server that is running a web app (in this prod server) and it is automatically launched on a new developer machine Is restoring from so that it does not need to install / configure IIS locally. I have read about using APCMDXA for backup and restore, but it only works for that machine (it uses encryption keys and changes those keys Between computers). Is there a way to take everything IIS related to...

php - Doctrine 2: cannot set OneTo Many relation correctly -

I have 2 entities: There are many unidirectional relationships for interview with interview and comment comment. Here is my YAML mapping file for comment: entities \ comment: type: unit table: comment repositoryClass: data collection location \ commentRepository areas: id: type: integer id: true generator: strategy : Auto parentid: Type: Integer Faucet: False column: parentid isactive: Type: W Credits: False column: isactive isremoved: type: integer faucet: false column: isremoved removaldate: type: datetime faucet: true column: removaldate user_name: type: string length: 255 faucet: false column: user_name user_email: type: string key Length: 255 Faucet: false column: user_email user_avatar: type: string length: 255 faucet: false column: user_avatar note: type: text faucet: false column: comment creation: type: date time zero: wrong column: build rating: type Falcon: False: False Here is my yaml mapping file for the interview: Institutions: Interviews: Type: Unit Table:...

python - Why it's not possible to create object attribute outside object methods? -

When researching about Python class attributes and example attributes, I found out that it is not possible to exclude object attributes from objects. ( or class method can be). Like the code below, "NameError" will be generated in Python. class test (object): def __init __ (self): self.lst = [] self.str = 'xyz' Why the Python Do not allow? I am not questioning the language maker's decision but there is a reason behind this. As such, it is technically incorrect or any other disadvantage of this behavior. You are defining a class, so there is no instance of pointing out external methods. Self: Drop square exam (object): def __init __ (self): self.lst = [] str = 'xyz' self to example , not class. You need to either make an example and assign or directly to the attributes ( test (. Str = 'xyz' ), you will get a method (when Actually can actually refer to an example).

java - JAVA_HOME get unset on Windows 8 -

I am working on Windows 8 using Oracle Java 7 and Djerobi (from torque box 2.2.0). There are some weird behaviors of the Jawa-HOME environment variable in the terminal ... If I put "set" then what I hope is what I get: JAVA_HOME = C: \ For example, I can run the bundle display rspec and it will work I set coverage = true / Code > and the same order to run again and I will get Java installation can not be detected, specified by JAVA_HOME: I have many I can always enter the same result, but mysteriously I can do this for a while. jruby -s bundle excel fantasy And this Sometimes will work ... never ... It's completely random and unpredictable ... it's a real pain! Any idea anybody? From my point of view it looks like an old Windows bug because everything was OK on Windows 7 Already tested: Instead of x86, x64 Setting at the end of the path is Maybe you have defined it correctly with what you have to do with the white space ...

image - Android Paint PorterDuff.Mode.CLEAR drawing black color on my view -

I want to implement Eraser for my painting app. I can delete the following code from paint.setColor (0x00000000); Paint.setAlpha (0x00); But when you start painting again, it does not paint properly, so that any ideas get rid of paint. Try the code below. Paint .Set Alpha (0xFF); // Transparent color paint. See xformode (new porterdaf xformode (porterdaf.mod.clear); // draw / See sample fingerprint java in API demo under folder graphics. setAlpha (Int a) To set Helper to Color (), which specifies only the alpha value of color, its R, G, B By leaving the value unchanged. See a document. Edit: Also check

numpy - Finding the lowest neighboring index in a Python array -

I have a problem in which we should write a function, when input of 2D array will be given offset in rows and for each index Return of the lowest price in the column of neighboring index; For the array of offsets in columns and for each array of each array, for an array example, if the lowest neighboring cell of an index is below one line and is in a column on the right, then offset is 1,1; If the smallest neighbor cell is on the left, the offset is 0, -1; If this is the smallest of its neighboring cells, then the offset is 0,0. Because I could not find the fast and correct way to do this, I wrote a loop that would be repeated through each index and see that from [i, j] to the surrounding indexes for a point Compared to all other indexes. Aall (): def findLowNhbr ("terrain"): "" "Two 2D-Arrays are made of offset (row and column) with neighboring area, in which The minimum eleven "rowOffset = np.zeros_like (terrain) colOffset = np.zeros_like (terra...