Posts

Showing posts from August, 2015

Horizontally Animate Gradient in HTML5 Canvas using jCanvas & jQuery -

मुझे एक भरण ढाल < गतिशील रूप से रंगस्टॉप (दाएं से बाएं) की स्थितियों को बदलकर अरोड़ा जैसा प्रभाव बनाने के लिए क्षैतिज रूप से चेतन करें मुझे लगता है, setTimeout () विधि का उपयोग करके किया जा सकता है लेकिन मुझे नहीं पता कि यह कैसे करना है। मेरे पास वर्तमान में एक स्थिर स्क्रिप्ट है: HTML: & lt; script src = "https://raw.github.com/caleb531/jcanvas/master/jcanvas.min.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; कैनवास & gt; & lt; / कैनवास & gt; जावास्क्रिप्ट: var mw = $ (दस्तावेज़)। वाइड (); Var एमएच = $ (दस्तावेज़)। हाइट (); var gs1 = 0 var gs2 = 1/5 var gs3 = 2/5 var gs4 = 3/5 var gs5 = 4/5 var gs6 = 1 $ ('कैनवास')। attr ('width', mw) .attr ( 'ऊंचाई', एमएच); वर्जिन ग्रेड = $ ('कैनवास')। बनानेग्रेडिएन्ट ({x1: 0, y1: 0, x2: एमडब्ल्यू, y2: 0, सी 1: '# ई 33 ए 3 ए', एस 1: जीएस 1, सी 2: '# एफबी 57 एफबी', एस 2: जीएस 2 , सी 3: '# 21 ए 5 ईबी', एस 3: जीएस 3, सी 4: '#

javascript - Objective C cuts off last part of string -

We are working on a plug-in for Cordova and we want to build callback JavaScript so that the code from the original code Go. So far, the problem here is: NSString * js = [NSString stringWithFormat: @ "project.notificationCallback ('% @',% @);" Uuidstring, value]; This should create the following example: "project.notificationClallback ('uuid-uuid-uuid-uuid-uuid', 1);" Instead of returning just the desired result, it gives: "project.notificationClallback ('uuid-uuid-uuid-uuid-uuid', 1 " So it only cuts the last part of the string when we do this: NSString * js = [NSString stringWithFormat: @ "Alarm ('jmoder')"]; All this works well, so we believe that with the exception of something else with % @ Is not there. Is there a obj-c expert in this house, which would avoid these characters I know or string is just a few letters too long? If I work with a single string I get: project.

css - Responsive Design with media queries not switching -

Good afternoon, I am trying to make a website responsive but I can not get it To make this work I have been googling for about an hour or 3 and I am pretty sure that I am not doing this wrong, but still it does not work. Here is my code: @ media screen and (minimum-width: 1230px) @ media screen and (minimum-width: 750 pixels) and ( Max-width: 1229 px) {body {display: none; }} The best way I can best describe this problem is when I go to full screen on my website with the browser it loads normally as I want it But when I minimize the window then it should load it just does not load any CSS on the second part of the CSS. I display the panel: there is no one so that the page is white to see that it works I have & lt; Meta name = "viewport" content = "width = device-width" /> is in my html URL site: Not sure if I answer my question It's allowed but it works now! Instead of: @ media screen and (minimum-width: 1230px) {} media screen

asp.net - Reverse engineering a precompiled website -

Hello I need your help. I have a preprominy website project and now I can not see the source files because I can not edit my web project I am left with only aspx files when I try to see them, then I get the message "This is a marker file that does not have to be removed from the printer and should not be removed." I removed the PrecompileApp.config file Try it, as well as some DLL files in the 'App_Web3610tfd' bin folder ... something like that but the website is still ineligible. Please help me. Thanks in advance. Unfortunately you are never going to get back the entire project of Telrek or Red Gate. . You are going to receive decompile files that were converted from code to IL, it usually does not get the code which is good and readable. You've got the worst case scenario, using pre-compiled and non-updating .aspx / .ascx files. To get it back, lots of code will be stitching and be prepared to spend some time to understand it. Many function calls can be

html - PHP Reference ID auto-increment for invoice -

I am looking to create a code that uses numbers such as 410001, 41, 0002, etc. I have a table table - & gt; ID, reference, name, company, and email, & lt; php $ d = 'A08'; For {$ N = 0; $ n <6; $ n ++} {echo ++ $ d PHP_EOL; }? & Gt; which outputs: A09 A10 A11 A12 A13 A14 I have a client ID = 1 or ID = 2 in my database, I want to present the ID for IDAD = 1 and reference ID for ID = 2 to 410002, so in my table, the sick has an ID and reference ID in the automrum. Do you make any sense for the people? Thank you! You can try these MySQL queries for your table: Table Create query: create table clients (ID int (16) AUTO_INCREMENT, reference int (16), name varchar (50), company varchar (50), email varchar (50), primary key (Id)); INSERT Query: Enter value in `customer` (` context`, `name`,` company`, `email`) (value (SELECT Info_schema.tables from AUTO_INCREMENT WHERE table_name = 'clients' and table_schema = 'DATABASE_NAME&

objective c - iOS 8 Orientation bug. Works in 7.1 -

Image
I have a view that is locked in the picture and then I have to push it to another scene where I have this in the landscape. . The video returned to the portrait after playing in the scenario, which works fine in iOS 7.1 but there is some weird bug on iOS 8.0. Please refer to this picture as you can see that the tabbar has gone to the center of the screen. It looks like this before going to the video player is. I have many other things Have tried the setting like [self.view.window setFrame: [[UIScreen main screen] border]]; I am currently using MPMoviePlayerViewController to show my video. But it's not just after I will work to see other pop popping up You guys can help me out so it works strange in iOS 7? Way i 'Controlling the Orientation Controller is a sub-cloning and it is saying that it is only in portrait, when I go to the video view, then I tell that the scenario is allowed. Then when this returns I only allow the picture again - Returns the s

How to insert norman date in mysql using php? -

I'm completely new to php and mysql; Need some help with this, I want to put a date in mysql table, formatted as DD / MM / yay. I have 4 columns in my table: id, name, age & amp; Birthday. My HTML code & lt; Form action = "php_creat_cliente.php" method = "post" & gt; Name: & lt; Input name = "context" type = "article" /> gt; & Lt; Br / & gt; Age: & lt; Input name = "focus" type = "text" / & gt; & Lt; Br / & gt; Birthday: & lt; Input name = "date" type = "text" /> gt; & Lt; Br / & gt; & Lt; / Form & gt; My PHP-code & lt? Include php ('config.php'); $ Name = $ _ post ['name']; $ Age = $ _ post ['age']; $ Birthday = $ _ post ['birthday']; Include $ save = mysql_query values ​​("Debt (name, age, birthday) '(' $ name ',' $ age ',' $ birthday ')); Header (&quo

c# - 'Object' does not contain a definition for 'Rows' and no extension method 'Rows' accepting a first argument of type 'object' could be found -

'object' A definition 'rows' and any extension method 'rows' to accept a first argument The type 'object' can not be found that you are missing using an instruction or an assembly reference code is given below? public partial square Default3: System.Web.UI.Page {static SqlConnection con = new SqlConnection (@ "connectionString"); Protected Zero Page_Load (Object Sender, EventArgs e) {{ddlImg.DataSource = GetData ("EmpID, Select EmpName from Tbl_Emp") if (this.IsPostBack!); ddlImg.DataTextField = "EmpName"; ddlImg.DataValueField = "EmpID"; DdlImg.DataBind (); }} Private Object GetData (String Query) {DataTable dt = New DataTable (); String constr = ConfigurationManager.ConnectionStrings ["tbFiles2ConnectionString"]. connection string; Using (using SqlConnection Thief = New SqlConnection (Construction)) {{SqlCommand cmd = New SqlCommand (query)) {{SqlDataAdapter sda = New SqlDataAdapter ()) {cmd.

Use other projects classpath for testing in eclipse -

Is there a way to configure an eclipse-java-project in a way that is similar to class-path- Another project uses the configuration. This project will have exam-classes which should work in the same environment as compared to the 'original'. Depend on your product project to your test project. Then in the Project Path Properties page of the product project, make sure that all the build path entries are exported. This will show them on the test project.

c# - Building a Cache Key quickly -

Image
I am using a custom cache implementation in a Web API 2 application, this cache stores many thousands of items and A single API request can be read up to 10,000 times. On the profile, I've found that the overall cache of each item is fully influenced by the performance. Results from .NET Profiling: Cache Key Description: I am creating the key of the item with a string hashing. Example: MySystem.MyProject.MyNamespace.MyClass.SomeMethod (44,6948) This is mixed in something like this, which is then used The caching framework is done as key (it is no longer used - refer to Edit 3): 1bbbfeae-b143-77f2-8381-5ee11f5b9c0c < / Pre> Obviously I need to ensure the specificity on each key, but without possibly presenting the possible duplication I have to improve the performance here Rica could not be found. Main Builder: Public category CacheKeyBuilder {Private methodology rules; Public CacheKeyBuilder (MethodInterceptionArgs Input) {methodArguments

r - Can't plot a scale bar or north arrow on ggplot2 -

Help! I have a data set of GPS X / Y locations for trees in the forest, and with this code in a beautiful map in ggplot: #ggmap! Library (GGMAP) Library (Maprop) Map & amp; Lt; - get_map (location = 'madagascar', zoom = 10) geodode ("kayajwat") # lawn latitude # 47.86682 -21.38024 C & lt; - "Keyzayvato" Marimop & lt; - get_map location = k, source = "stemon", mappetpe = "toner", crop = falls, zoom = 16) ggmap (myMap) m However, what type of code do I try, I can not try any type of arrow to point to the answer or scale bar on my map! map.scale & lt; - ggmap (new) + (GGMAP, +) Yes = "normal", mapper = FALSE)% +% sites.data + geom_point (aes (x = lon, y = latitude, color = color)) + geom_text (aes X = lon, y = lat, label = label), hjust = 0, vjust = 0.5, size = 8 / ptspermm) + geom_segment (data = sbar, aes (x = lon.start, xend = lon.end, y = Lat.start, yend = lat.end)) + geom_text (data = sbar, aes (x

c++ - unresolved externals in old .net project -

इस सवाल का पहले से ही एक उत्तर है: < / P> 27 जवाब मेरे पास यह पुरानी परियोजना है I अब देखने के लिए सौंपा गया है इसमें 2 डीएलएल और एनएसीटी 2003 सी ++ पर एक ओसीएक्स शामिल है जो एक दूसरे के बीच और एक बड़ा आवेदन के बीच संवाद करते हैं। मुझे उनको परिवर्तन करने की आवश्यकता है, लेकिन जब मैं ओसीएक्स बनाने की कोशिश करता हूं तो मुझे 8 एलएनके2019 अनसुलझे बाहरी त्रुटियां मिलती हैं जिनको मैं नहीं जानता कि कैसे तय करना है। डीएलएल में से एक में इन एलएनके2019 त्रुटियां भी होती हैं जब मैं संपूर्ण समाधान तैयार करता हूं लेकिन यह अभी भी। Dll का उत्पादन करता है। जहां तक ​​मुझे पता है कि पिछली बार आखिरकार सफलतापूर्वक इन्हें सफलतापूर्वक बनाया था, तब तक परियोजनाएं नहीं बदली गई हैं मुझे नहीं लगता कि कोड या परियोजना सेटिंग्स के साथ कुछ भी गलत है मैं Windows XP के साथ ओरेकल आभासी मशीन का उपयोग कर रहा NET 2003 को चलाने के लिए सक्षम होने के लिए त्रुटियों उत्पादन:। mfcs42.lib (dllmodul.obj): त्रुटि LNK2019 : अनसुलझे बाह्य प्रतीक "सार्वजनिक: __thiscall AFX_MODULE_STATE :: AFX_MODULE_STATE

Binary to Decimal Conversion in C - Input Size Issue -

I have to write a C program for one of my classes which changes the given binary number to the decimal. My program works for small inputs, but not for the big ones, I believe it can be due to the conversion specifier that I am using for scanf () but I am not positive my code is down # include & lt; Stdio.h & gt; # Include & lt; Math.h> int main (zero) {unsigned long inputNum = 0; Int currentBinary = 0; Int count = 0; Float decimal number = 0; printf ("a binary number input:"); scanf ("% lu", and InputNum); While (InputNum! = 0) {currentBinary = inputNum% 10; InputNum = InputNum / 10; Printf ("% d \ t% d \ n", current binary, input number); Decimal number = presentbread * pow (2, count); ++ count; } Printf ("decimal conversion:% .0f", decimal number); Return 0; } 39 9 333 3 39 913 3 39 9 1 1 39 9 393 3 decimal Decision: 5264 When you do this for a large number, then inputNum current binary = input number% 10;

typescript / jscript side-by-side in Visual Studio 2013 update 3 -

Image
Since installing VS 2013 update 3, I do not have the option to display the JScript output side-by-side As I have seen the TypeScript source, I remember remember to use the Web Associations support first. Is there any way to enable it? You may have to enable it in Web Essential Options tool - & gt; Options and select web applications and typescript at left Screenshots:

c - Voronoi diagram bound by circular tour -

I am facing the following problem: I made a point cloud P and gave a subset of that point cloud In the BB, the node B (whole) point is the limit of cloud P (in fact, B is given in the form of closed, oriented circular tour). Now, I want to calculate the P Voronio diagram, which is intersected by B., and to extract the area of ​​every (transferred) Voroneini polygon. Here's an example of the situation: Basically I want to pierce the blue colored polygons with green segments. For my questions: From the spot, is the C library that solves this exact problem? If not, then there is a better way of solving this problem, computing Voronejo diagrams using some libraries, then explicitly penetrating (green) areas with polygons from library production ? Perhaps by exploiting a controversial Delaye triangle? PS: I know that this achievement may be possible through CGAL. However, CGAL is never used, CGAL is quite complex and optimizes the example code as if it is far from straight

Paypal IPN: is the payer_email always present for purchases? -

is exactly as the title ... Do I always be present in an IPN message when receiving money from Payer_mail Can i Yes, you should get it for incoming transactions. You can check detailed information here.

ruby on rails - Devise Omniauth Error -

I have installed the developer and Omniauth (: twitter) and now I am getting an error which states logic error / user / sign_up can not be zero or empty in the first argument in the form devise / new.html.erb & lt; H2 & gt; Sign up & lt; / H2 & gt; & Lt;% = simple_form_for (resource, like: source_name, url: registration_page (source_name)). F | & Gt%; & Lt;% = f.error_notification% & gt; & Lt; Div class = "form-inputs" & gt; & Lt;% = f.input: Email, Required: True, Autofocus: True% & gt; & Lt;% If f.object.password_required? & Gt%; & Lt;% = f.input: Password, Required: True% & gt; & Lt;% = f.input: password_confirmation, Required: true% & gt; & Lt;% end% & gt; & Lt; / Div & gt; & Lt; Div class = "form-action" & gt; & Lt;% = f.button: Submit, "Sign Up"% & gt; & Lt; / Div & gt; & Lt;% end% & gt; & Lt;% = Render "devise

vb.net - Tuning Entity Framework - dbContext? -

itemprop = "text"> I have some model classes: public class MyViewModel public property MyID () integer Go into the form of Folk ReadOnly Property FirstList IEnumerable (SelectListItem) as the new MyContext dim itemQuery form using dbContext = (d in T. dbContext.ItemSet T) Dim Item IEnumerable (item) = itemQuery.ToList () return item. Select (function as O) New SelectListItem () {.text = o.ItemDesc, .Value = o.ID}) End assets publicly readOnly property using second end Go to SecondList using IEnumerable (as selectListItem) using the dbContext as the new MyContext _actu (get from dbContext.FrameworkSet in T.) IEnumerable (ITEM2) = _Query.ToList () Return _list.Select (Function (o) {.text = o.Item2Desc, .Value = o.ID as _list slow}) and end and end and property and class with new SelectListItem () Actually, I am calling MyContext twice, it instantiates EF repeatedly, right? So my idea is just a square global dim dbContext as new MyContext In addition to the

how do I use the variable from a For loop outside the loop in C++? -

So I'm a little distraught in my programming skills and I have no real experience other than college classes I have taken in the past I'm working on a program for a class, but I'm in a turnaround; I do not know how to use a variable's value inside a for loop outside of a loop. Here's the code that I am referring to: Include "iostream" using the namespace std; Int want, need; Int counter = 0; Four responses, cont; Int diff (int want, int is); Int main () {cout & lt; & Lt; "Welcome! \ N"; Cout & lt; & Lt; "This program will help you reach your savings goals! \ N"; Cout & lt; & Lt; "Would you like to use this program? (Y / n) \ n"; Cin & gt; & Gt; reaction; While (feedback == 'Y') {cout & lt; & Lt; "Please enter all dollars only in full dollars! \ N"; Cout & lt; & Lt; "Please enter the amount of money you want to save: $"; Cin & gt; & Gt;

java - Maven remove resource from dependency -

मेरे पास एक jgroups निर्भरता है जिसमें log4j2.xml है इसकी जार जो मेरी कॉन्फ़िग फाइल के बजाय log4j द्वारा उठाया जा रहा है। मैं कैसे मेवेन को इस फाइल को जार निर्भरताओं से बाहर निकाल सकता हूं? ... इसके सुझाव से पहले, मैं सिस्टम संपत्ति का उपयोग नहीं कर सकता log4j2.xml फ़ाइल को स्पष्ट रूप से सेट करने के लिए क्योंकि मैं अपने परियोजना को आईडीई में किसी भी JVM चर को सेट किए बिना शुरू करना चाहता हूं। छाया प्लगइन विशिष्ट फाइलों को बाहर कर सकता है - देखें। इसके अलावा, मैं कोशिश करता हूं कि क्लासपाथ पर अवांछित एक से पहले अपनी कॉन्फ़िग फाइल होने से log4j को अपना लिया जाएगा इसके अलावा log4j2-test.xml और log4j2.json को log4j2.xml पर क्लासपाथ पर अग्रता है जब तक log4j.configurationFile सिस्टम गुण सेट नहीं किया जाता है, जो कि बीटीडब्ल्यू आप मेवेन से भी कर सकते हैं, इसलिए आपको कुछ भी सेट नहीं करना है आपका आईडीई।

bash - Create shell script from Extendscript Toolkit -

As one of the outputs from an AccessScript, I want to create a shell script which can be executed by the user. Here's a very basic example: create createShellScript () {var content = "#! / Bin / bash \ ndate"; Var outputFolder = Folder.selectDialog ("Choose where to save:"); Var shFile = new file (output folder. AbsoluteUri + "/shell.sh"); shFile.open ("w"); ShFile.write (content); ShFile.close (); } CreateShellScript (); If I take the resulting file ( shell.sh ), run it on chmod + x to make it exjectable, and Then run it, if nothing happens, however, I adjust the above script to create the same content but is a text file? It opens the shell.txt file, copies the content editor into a blank document, and saves it as a .sh file, and then Chmod and to run it, it works fine. Why does not this extension generate the appropriate .sh file when using this method? Thanks any help. S You need to set line feed character f

java - LIBGDX- Unwanted texture blending in the shader -

Image
I am trying to add two textures (PNG) images to LibGDX in my own shader. Everything works great, except for the math / compositing part. Hopefully someone can help me with this mixture problem! This is my base texture (256 x 256 px, 32-bit texture) < / p> This is my "top" texture (256 x 256 px, 32-bit texture) I want the effect of transparency work as well as a simple base texture with other textures. and the current result texture Between blending, a bit bright where there are "dots" of texture. I have tried many different solutions. This is from the renderer, my class which applies the shield of lbgdx: Gdx.gl20.glEnable (Gdx.gl20.GL_BLEND); & Lt; - No matter Gdx.gl20.glBlendFunc (Gdx.gl20.GL_ONE, Gdx.gl20.GL_ONE_MINUS_SRC_ALPHA); & Lt; - Have not made any difference with the cube, but make transparent on a more advanced net. Piece Shader: #ifdef GL_ES Accurate Medium Pommel Float; #endif Separate vec2 v_texCoord0; Un

python - Django pipeline doesn't load assets -

I followed a sample project I have the structure of files: - Mysite - mysite - __init__.py - settings.py - urls.py - wsgi.py - choice - migration - template - poll.html - static - script.js - style.css - admin.py - models.py - tests Py - urls.py - views.py - manage.py Everything works well, however, the problem is using the property to manage I Configured the same as the given code, but this property has to be Does not load. settings.py INSTALLED_APPS = STATIC_URL = '/ static /' STATIC_ROOT = os.path.join (BASE_DIR, 'static_files') PIPELINE_ENABLED = True STITICFILES_STORAGE = 'Pipeline.storage (' 'degego.contrib.staticfiles' ',' pipeline ',' choice ',) .PipelineCachedStorage' PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.cssmin.CSSMinCompressor' PIPELINE_CSSMIN_BINARY = 'cssmin' PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.slimit.SlimItCompressor' PIPELINE_CSS = {'PollsX': {

wordpress - How to add category to all post by using sql query? -

I have a thousand posts and not everyone has a class. So, do you know how to associate the category with all the positions using the SQL query? Thanks! No need to use your SQL, you can do it with bulk actions in your WP Go to your listings and select them all Select / Edit Large Activities li> Edit All Together Please.

db2 luw - DB2 - Determine a future date based on two fields -

I need to calculate a date in DB2 for Unix. I have a date field: CONTRACT_DT (example: 2/7/2006, 8/25/2006, 11/16/2007, 2/25/2008, 12/29/2005) and one type of field head (example: C, I, E, Z, V, K) I need to calculate the next date that the loan will be reviewed (REVIEW_DT ). If Prime = Z is CONTRACT_DT < Five Years If the Prime Minister = Faucet or any other letter, then Tap An example loan 01 has a CONTRACT_DT of 3/1/2004, and V PRIME. So I need to count 3/1 for three years / 2004, unless I have a date of more than MTHLY_CLOSE_DT. (Option 2007, 2010, 2013, 2016, 2019, 2022). The correct answer is 3/1/2016. I know that the structure is a matter statement, but I have no idea how to choose a date based on multiples of the year and there is one more than the MNTHEYCTTDTT. Even what I have so far: created process "finance" "AL_LOOP_TEST" (out R. RVDT Date) BEGIN Nuclear Agreement v_tmgi DATE; DECLARE v_ctdt DATE; DECLARE v_rvdt DATE; SET v_

Unfinished code (Simple payroll) - javascript -

Please help me to solve the formula in "othrs" (overtime hours) code> var name, hour, rate = 120, oterate = 150, Others, BP, OTPE, GPA, DAD, NPA name = prompt ("Enter your name") hrs = prompt (enter "Working hours ") Othrs = bpay = hours * rate ottap = orthurs * ottet GPA = BPA + otpe dead = BPA * .10 NPA = GP - Deep if (HRS and LT; 40) {HRS = 40} alert (" name: "+ + Name + "\ nNo. Hours work: "+ hours +" \ n Not in overtime hours: "+ + + + +" \ n Basic payment: "+ BPA +" \ nOvertime salary: "+ OTPE +" \ nGross pay: "+ gpay +" \ N deduction: "+ Ded +" \ n Net Payment: "+ npay") < P> Well, because this question is not being closed, I can answer it. See it in action here: Now, this is not the most effective way of doing this and I will do my code for you I'm not going to reapply, but it's yours The answer is: Hour, rate = 120, ottet = 150, Au

AngularJS : How to inject custom service in controller? -

मैं AngularJS के साथ काम कर रहा हूं। मेरे पास निम्न पृष्ठ है: & lt; div ng-controller = "UserController" & gt; & Lt; h4 & gt; एक खाता बनाएं & lt; / h4 & gt; & Lt; form class = "form-horizontal" role = "form" & gt; & Lt; div वर्ग = "फॉर्म-समूह" & gt; & Lt; label = "inputLastName" वर्ग के लिए = "col-sm-2-control-label" & gt; अंतिम नाम & lt; / label & gt; & Lt; div class = "col-sm-10" & gt; & lt; input type = "text" class = "form-control" id = "inputLastName" प्लेसहोल्डर = "अंतिम नाम दर्ज करें" ng-model = "user.lastname" & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; div वर्ग = "फॉर्म-समूह" & gt; & lt; label = "inputFirstName" वर्ग = "col-sm-2-control-label" & gt; प्रथम नाम & lt; / label & gt; & Lt; div class = "co

scala pattern mathing. What is this matching now -

/ ** (**) Continuous duplicate pack of list elements in sub-listists. If there are repeated elements in a list then they should be kept in separate Upanishads. Example: Scala & gt; Pack (list ('a,' a, 'a,' a, b, c, c, a, a, d, ee, ee, e)) res0: list [list [symbol]] = list (list List ('A', 'A', List 'D'), List ('E', 'A', 'A', 'A', A), List ('B'), List ('C', C) E, 'E,' E)) * / For the general case of this type: object matchTest1 application {def matchTest (x: int ) Expands: string = x match {case 1 = & gt; "One" case 2 = & gt; "Two" case _ = & gt; "Many"} println (matchTest (3))} I know that it is trying to match x with pattern. But as an example below, what is it getting? Resolve similar to // 1- My solution / ** * recursive P8 solution * / def pack (Input: list [any]): [list [any]] = { Diff Comp (L: List [Anyone], Last: Any:

Get current user name autoit -

I try to get the name of the current user here my code Local $ IniRead = IniRead (@AppDataDir and "\ Mozilla \ Firefox \ profiles.ini", "Profile0", "Path", "Default") MsgBox (0, "", "valeur:" & Amp; @AppDataDir and "\ Mozilla \ Firefox \" and $ IniRead) But I use #requireadmin, so I got the name of the race and did not name it I do not use the #requireadmin reason to copy a file Kata ... If anyone has found a way. You can use the username @ to use the user. Milos is right, #RequireAdmin directs Autot to request administrator tokens from the operating system. If the user is logged in as an administrator, then it will prompt them to continue, or remain silent on the basis of the UAC. If logged on user is not an administrator, they will be prompted for an account with administrative credentials. If you are looking to copy a file to @AppDataDir, you will not need the Administrator's rights a

libgdx - How to name iOS launch icons for a universal app? -

Image
This may be a trivial question, but the correct answer (and what dimension to use for iOS launch icons) ? Note that I'm not using Xcode but instead porting a libgdx game to iOS via Robow. This my iOS / data / folder looks just like the right one: I think I have "default" launch images set correctly, but I'm not sure about the launch icon. (All this confusion is coming from the fact that there is rare information about the new iPhone 6 and 6 Plus.) Basically, the launch icon files are incorrect and / or Is missing << Strong> /i.stack.imgur.com/sZ04R.png "alt =" Enter image details here "> If I add more launch icon images So I'll need to change anything here? (I'm new to iOS development if it is not yet clearly clear.) <div class = "post-text" itemprop = "tex I have no <em> not </ em> the following icons in the data icon in my <code> ios / resources </ code> folder: <

rust - What can be the reason of `LLVM ERROR: Target does not support MC emission!`? -

I am currently working on Roost in LLVM tutorial. I have already implemented parts of the Kalidoscope REPL. It used to work well for me, but suddenly stopped it to work and LLVM error: every attempt to calculate a value in the target MC does not support emissions it seems now That's it's happy after updating the latest compiler to the latest night (but I'm not sure here). Follow the relevant piece of code. Initial function: # [permission (non_snackcase)] Pub unprotected FNLDVMI initiatesNative targets (llvm :: LLVMInitializeX86TargetInfo (); LLVM :: LLVMInitializeX86Target (); LLVM :: LLVMInitializeX86TargetMC (); } Module creation: module = llvm :: LLVMModuleCreateWithNameInContext (module_name.to_c_str). as_ptr (), context); Performance engine creation: let exec_engine = 0 as llvm :: ExecutionEngineRef; Give error = 0 as * const c_char; LLVMCreateExecutionEngineForModule (& amp; Function, Module, and Error;); Insist! (Exec_engine! = Llvm as Ex

vb.net - Vbdotnet Substring -

निजी उप बटन 1_Click (ByVal प्रेषक के रूप में System.Object, ByVal e जैसा सिस्टम.EventArgs) बटन हैंडल्स 1। क्लिक करें मंद रीडर के रूप में StreamReader = My.Computer.FileSystem.OpenTextFileReader (Textbox1.Text) एक स्ट्रिंग ए = रीडर के रूप में मंद। रीडलाइन रिच टेक्स्टबॉक्स 1। पाठ = रिच टेक्स्टबॉक्स 1। पाठ + एक लेबल 5 टेक्स्ट। RichTextBox1.Text.Substring (5, a.Substring ( 5, a.Length)) reader.Close () अंत उप हैलो। मैं एक पाठ फ़ाइल को पढ़ने और विभिन्न चर में नंबर डाल करने की कोशिश कर रहा हूँ। टेक्स्टफ़ाइल इस तरह की है हर बार जब मैं कोड चलाता हूं तो यह एक त्रुटि के साथ बाहर आता है। मुझे क्या करना चाहिए? आप इस रेखा से क्या करने का प्रयास कर रहे हैं? Label5.Text = RichTextBox1.Text.Substring (5, a.Substring (5, a.Length)) यह भाग: a। सबस्ट्रिंग (5, a.Length) एक स्ट्रिंग देता है, लेकिन सबस्ट्रिंग का दूसरा तर्क एक पूर्णांक की अपेक्षा करता है, इसलिए यह एक त्रुटि पैदा कर रहा है। इस तरह दिखता है : सबस्ट्रिंग (पूर्णांक के रूप में शुरूआती, पूर्णांक के रूप में लम्बाई) ।

Dealing with Android's MediaPlayer while rotating screen, pressing Home Button or App is interrupted -

I am in a difficult part of the workflow / design on my app. I have a media player that runs in a service, I want to stop the music when the user leaves (but not closed) the app is the same, the home button MediaPlayer's breaks () and start () are implemented in the activity of onStop () and onResume () , Respectively, this button is working properly and relabeling the app, but it happens even when the activity cycle is due to Screen rotates. So, how can I save it efficient / elegant way? Music should not be interrupted when the device is rotated. I thought of overriding the click method of the Home button, stop there mediaplayer and set a global boolean flag to check in onResume () if the media player must start again. But it seems like I do not have a hack or such a good practice. Am I wrong with this? Is there a better way? If your minSdkVersion is at least 14, you can see the isChangingConfigurations () flag before pausing the media player: Prot

textbox - Python 3.4 Tkinter - How can I just delete a string anywhere in a text widget? -

If you need more details, I am happy to provide it, but rather provide me the scenario. I did this to insert the HTML line breaks in my text: count = int (text_entry.index ('end-1c'). Split (' . ') [0]) in (calculation): if i! = 0.0: text_entry.insert ('% d.end'% i, ' ') Just keep it, after I execute my remaining function this lesson I want to return, I want to return the text to its original state. I tried to use text.delete () and text.replace () , but let me Do not think just remove the inserted string without changing the rest of the text. I'm new to the tanker, so I'm sure I do not understand the index or some basic usage. I appreciate your time and attention. There is a method in the text widget that you want to remove the text of any category . It does exactly what she should do - give it two letters and it will remove the text between them. For example, you can remove the entire second line of text: text_ent

java - Set the checkbox of a CheckboxTableViewer when the row is clicked -

I am very new to SWT really started to work on today's table of a type I Chekboksteblwuvr I what I want to be able to, even when the user is a listener selects the line (ie also click anywhere on the line) I Czech box should be the Czech (tick) I currently have CheckboxTableViewer at: diagnosesTableViewer.addCheckStateListener (new IKCestat Aistnr () {@Override public void Chekstet Chenjed (Chekstet Chenjedivent event) {changed location nomination naming = (naming) event KgetElement (); if (EventkgetChecked ()) {SelectedNomenclatureskadd (changing location name);} Other {selectedNomenclatures.remove (Changing Location Nominations)}}}}); I am able to choose a row by checking the checkbox. But I want to select the check box, when the user selects the row on any column by clicking anywhere on that row (not just checkbox). I think that argument can AddSelectionChangedListener to AddSelectionChangedListener add but I'm not sure how to go about it any help me with this

php - Script does not work, shows no errors -

I have created a small script on the websites 'cache' copies, and as far as I can tell it coded well It is, though, when I run it in the browser, it does not work and does not show any errors. My code: & lt ;? Php // display errors please error_reporting (e-mail); Ini_set ('display_errors', 1); // Random string $ length = 5; $ String = ""; $ Letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // Thanks for the StarkerFrov code while ($ length> gt; 0) {$ string. = $ Characters [mt_rand (0, strlen ($ letters) -1) ;; $ Length - = 1; } Get $ GET request from $ random = $ string // if (isset ($ _GET ['link'])) URL {$ link = $ _GET ['link']; $ Data = file_get_contents ("http: // $ link"); Send data to // html file file_put_contents ("/ cache / $ random.html", "$ data"); Echo "successfully cached. & Lt; br & gt; Link: http://example.com/cache/$random.html"

html - C# - Match Entity Property to String Value -

I am trying to generate an HTML table where both column counting and width can be optimized. I want to be able to tie columns in their respective columns ... Example Schema : [Invoice] [Quantity] [Invoice] [ItemName] [Invoice]. [Total Amount] Originally, I was trying to pass along two properties (both dictionaries) in one property. Something like this: Public class custom object {public dictionary & lt; String, int & gt; THTitle_width {get; Set; } Public Dictionary & lt; String, string & gt; InvoiceColumn_ChorrespondingTHTitle {get; Set; }} I want to achieve something like this: THTitle_Width.Add ("My Quantity Header", 100); InvoiceColumn_ChorrespondingTHTitle.Add ("Quantity", "My Quantity Header"); Ideas for data inside [invoice] [Quantity] column is then known to come under the table column "My Quantity Header", in return for a width of 100 (px). It will then output: etc ... Upon the reason, you

audio - jquery sound not playing -

I want a sound when there is more than 50 x position value in a div. I control the div with my arrow keys. I'm guessing audioElement.play () is not working. Neither the sound nor the warning pop up (function place) down Fixed code First of all, your sound handle was out of the scope, so I defined it in the window: window.audioElement = audioElement = blabla second you try to compare the object with a number Was doing. There is no need to wrap x.left in Jquery. If (x.left> 50)

python - Unicode Encode error when writing to CSV after scraping -

I am learning web scraping, and to practice, I get a table of baseball figures from Derek Jeter I am trying to scrape. Using the beautiful soup, I was able to extract it like a table: import from bs4 BeautifulSoup import urllib2 jeter = "http://www.baseball-reference.com/players/j / Jeterde01- bat.shtml "Page = urllib2.urlopen (jeter) soup = beautiful soup (page) table = soup.find ('table', id = 'batting_standard') #The list of header names tableheaders = table.find_all (' Th ') Header = [] I = 0 while i table_rows ends with a list, where each element is another list representing each row of the table: table_rows = [['a', 'b' , 'c'], when I try to write it in CSV using this code: Import CSV open ('/ home / russell / Desktop / python learning / web scraping / jeter.csv ',' wb ') Fp: a = csv.writer (fp) #write Header for CSV file: awriterow (headers) for e in table_ro: a.writerow (e) I get the

php - Accidentally added all zend framework files to the commit, how to remove them -

SOS! SOS! Instead of p>, git commit-A Because I was scared of unknown files, I would like to add some jnd files such as theories, musicians, etc. Was about to find and boom! My question is 1. How to remove zend files from committed 2. How to clean up this mess? Please help! The world is beautiful again. I used to share a heap of mistakes so that it could help someone someday: Zed Framework Files committed with project files. Never do that especially with vendors. After I went to the previous branch, the project started throwing 500, because it was not able to find all the Zand files. (I was trying to reset the GIT file in the previous step and I think there was no mismatch in the Zend Framework files) I hope another folder in this sequence set up in Z. folder That the missing files will be rebounded. Solution: 1. A soft reset was made: Go back to git reset --soft HEAD ~ 3 a stable commit. 2. Fired all zend files. 3. Recommended the desired

sql - How can I find all columns A whose subcategories B are all related to the same column C? -

Image
I am trying to understand relational algebra better and I'm having trouble solving the following types of questions. : Let's say that there is a column A (department), a column B (employee) and a column C (manager). How can I get all the departments who have only one manager for all their employees? An example is given below: department | Employees Manager ------------- + ------------- + ---------- A | | John | Bob A | Sue | Sam B | Gym | Don b Alex | Don si | Jason | Z.C. Greg In this table, the results I get are all sections B and C, because all their employees are managed by the same person (respectively Don and Zee). However, the department will not be repatriated because its employees have many managers. Any help or hint will be appreciated. Such problems usually call for self-union. After joining the department on your own, filtering tuples where the managers are equal, we can reduce all unwanted yields, which we can only deduct from the original relatio

python - Pivoting a Pandas dataframe with a gapless daterange as index -

Question: As a condition with the title, how do I get the desired results given below ? Sample data: Date Client Order 0 1/30/1987 AAA on 111 1 3/28/1987 BBB ON 112 2 3/28/1987 CCC ON 113 3 3/28/1987 AAA ON. 114 4 3/31/1987 DDD ON 115 5 3/31/1987 BBB ON. 116 6 3/31/1987 EEE ON. 117 7 4/1/1987 FFF ON 118 8 4/1/1987 CCC ON 119 9 4/1/1987 AAA On 120 10 4/2/1987 DDD ON 121 Desired result: AAA BBB CCC DDEEEEFFF 1987-01-30 111 No NN nor NN nor NN 1987 -01-31 na nn na na na na na naa 1987-02-01 na nn na na na na na ... ... 1987-03-28 114 112 113 No Nn na na ... 1987 -03-31 Nain 116 NN 115 117 NN 1987 -04-01 120 NNN 119 NN NAN 118 1987-04-02 NN NA NA 121 NN NAN Try efforts Key: # Df_p = df.pivot (index = 'date', column = 'customer', value = 'command') # Around There, but I do not want to repeat every cell again to get the order number. Df_symbol = 'df [' client '] df_symbol_unique = set (df_symbol) index = pd.date_range (df ['

sorting - How to implement Sort Merge Bucketing Map Join? -

I would like to join two tables that have the same number of buckets with the same columns and the same sort. Apart from that setting, do you need to set up any other status other than setting the properties? set hive Ooptimize.bucketmapjoin = true; Set hive Optimimize.biketmapjoin.re sortedmerge = true; Set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat; If you have two datasets that are too large to join in the map side To include a skilled person, the technique is to sort two datasets into buckets. This trick is cluster and sorts by joining it. table order (int, price float, quantity int) CLUSTERED BY CREDIT (CID) in 32 wallet; Make Table Clients (ID Fav, First String, Last String) in CLUSTERED BY 32 Bucket; This provides two major optimization benefits: Adding to makes it easy to trim, the value of all possible matches remains on the same area on the disk. All the values ​​matching a bucket are tied on the same node, there can be

listbox - Traverse through a wxListBox in Python -

I have this static method that replaces the characters in a string: @ Staticmethod def reverse (s): TCTT = '' in the range for I (lane -1, -1, -1): TSTT = S [i] Return TST I have A wxListBox filled with different strings. I need to cross through wxListBox and apply my reverse method to each reverse: [self.listBox1.GetString (i) in the category (self.listBox1 .GetCount ())]: Self. The above code is not rolling back my string, but I'm sure my reverse method works. How do I apply my reverse method to each string within the wxListBox? Your code works perfectly :-) It turns the wire, but that's it. If you want to see the referenced strings in the listback, then you have to update the list order. It all goes around the fact that the strings are immutable, and in your reverse you actually return a new string (reverse) but there is no command to put the string back in the listboxes. Therefore, something like this should be done: for the category (self.listBo

c++ - trouble with error function -

Currently the principles of programming and principles using C ++ and I am not quite able to understand how the error function is used as it was used. in the book. is the function inline zero error (constring & amp;;); Runtime_error (s); } which was included in the std_lib_facilities header file. This is a small program that uses it. int main) {Cout & lt; & Lt; "Please enter the expression (we can handle +, one, ???, *, and /) \ n"; Cout & lt; & Lt; Add an X to the end expression (i.e., 1 + 2 * 3x): "; IntraLval = 0; Interview; Cin & gt; & Gt; Lval; Read one / one read / left most operation and Read (if! Cin) error ("any first operand"); For one (one- Â € œCinâ € | rival; if (! Cin) error ("any other operand"); switch (op) {case '+': Level = = Raval; One / One / One plus: Laval = Rawal = Rawal Break; Case 'One' '' '' '' '' '' '' One '' / de

ruby - How can I find a puzzle the user has not yet solved in my Rails 4 app -

I am creating a simple puzzle game to track the tracks. 4. There are two models in my train app, users and puzzles. I am trying to understand how to design two models so that I can track a puzzle that the user has solved and to play it An unresolved puzzle can be found. The puzzle does not have to be solved in any order, so my app should be able to find any puzzle that the user has not yet solved. There is a clear way to create multiple relationships between users and puzzles and create an attribute on the user model so that it can store the ID of the already resolved puzzle, then a simple DB Use a query that does not have a puzzle ID in the list, but it seems ineligible ... #Untested code, typos / bugs Sorry for the class user; ActiveRecord :: Base has_and_belongs_to_many: solved_puzzles, class_name: "puzzle" def unsolved_puzzle solved_puzzle_ids = self.solved_puzzles.map {| P | P.id} unsolved_puzzle = self.puzzles.where ("id not in?", Solved_puzzle_ids).