Posts

Showing posts from September, 2013

recursion - Need helping find examples/instruction -

Some practices are going through, and my book is not very useful in clarifying solutions. T (n) = 2 + T (N - 2): T (n) = n when n% 2 = 0 1) When n% 2 = 1 Thanks! function t (n) {if (n% 2 == 0) return n; And if (n% 2 == 1) returns 2 + T (N-1); } Say that if you use 3, then 3% 2 is checked in the function, which is not 0, so it has pose in other words which is now 3/2 and gives the following: Function T (3) {if (n% 2 == 0) return n; And if (n% 2 == 1) returns 2 + T (N-1); // T (3-1) = T (2)} This will call the same function, but now will be with 2 instead of 2 and the return statement will then be added to the original 2 and likewise, i hope i have explained a bit of function t (2) {if (n% 2 == 0) return n; And if (n% 2 == 1) returns 2 + T (N-1); }

Can I create "releases" in git like I can when using github? -

While using Git both (and when I say that I mean I have a GIT repository that I host) and when using Gitobb (which I also use for various projects) I know that I can create tags (which I think of at one time as a branch release / snapshot, which can not be changed). Although I recently noticed that I can now "release" on github, it's a tag and then some labeling (maybe this is a more complex animal than syntactic sugars or maybe it is a more complex animal). Looks in For example, if I have created a tag on git or github through the command line using the following: git tag - a 2.1-m "in skynet Fixed AI problem "Master GIT push - tag Then actually create a tag, but not" release "(clearly) In Geethub GUI, I can convert it to "Release" with a few clicks. However, I can not find any way to do this in regular GIT (i.e. GIT Repo I host). / P> Is it possible to create a "release" in git or should I be happy with the tag? An...

c# - Create Datatable from a list of column values -

I am trying to create a database with the following lists ** list1 * * 1 2 3 4 5 ** list 2 ** foo1 foo2 foo3 foo4 foo5 The last table should look like this (not the name of the colonel's name) I am trying to avoid referring to the respective indexes of both lists and adding them as rows; Somnath 1 Somnath 2 1 foo1 2 foo2 3 foo3 4 foo4 5 foo5 Is there a way to do this? The way is the way? Edit: I can not have any list which is just 2 It will work with any number of IEmarebal. Private static zero main (string [] arg) {var list1 = new list & lt; Int & gt; (New [] {1, 2, 3, 4, 5}); Var list2 = new list & lt; String & gt; (New [] {"foo1", "foo2", "foo3", "foo4", "foo5"}); Var list3 = new list & lt; Bool & gt; (New [] {true, false, truth, truth, wrong}); Var dt = MakeDataTable (list1, list2, list3); Console.ReadLine (); } Private Static Datable MacDataTable (Parameters IEnumerable [] lis...

android - Get longitude and latitude by touch event -

How can I get location latitude and latitude by touch events on the marker? I want that when users click somewhere on the map, its latitude and longitude please help me. Thanks Just override the method of class. Click the field LatLng point will be, then: map.setOnMapClickListener (new OnMapClickListener () {@Override public void onMapClick (LatLng point) {/ / TODO auto generated method strub double latitude = dot.liteitude; double lng = point.langey;}});

cassandra - Running hadoop jobs over snappy compressed column familes -

I am trying to dump the pig relation of a compressed column family. It has a single column whose value is a Jason Blob it is compressed through fast compression and the value validator is typed bytes. After making a connection and making a dump, I get the trash. Here is the description: column family: cf key verification class: org.apache.cassandra.db.marshal.TimeUUID type the default column value validator: org.apache.cassandra.db.marshal.BytesType Sorted by cell: org.apache.cassandra .db.marshal.UTF8Type GC Grace seconds Q: 86400 Compaction Min / Max Threshold: 2/32 Read the chance to repair: Read the local localized at 0.1 DC. Read the chance to repair: 0.0 Io cache on flush: Copy to false writing: True caching: KEYS_ONLY Bloom Filter FP Opportunity: Default built index : [] Compaction Strategy: org.apache.cassandra.db.com Advertising. Size treed Compaction Streaking compression option: sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor Then I: suffo...

image - List Point coordinates Setpixel adaptation -

सूची & lt; बिंदु & gt; अंक = नई सूची & lt; प्वाइंट & gt; (); // मैं सेटपिक्सल अनुकूलन x, y, सूची & lt; बिंदु & gt; निर्देशांक कैसे प्राप्त करूं? अंक = नई सूची & lt; प्वाइंट & gt; (); निजी शून्य बटन 1_Click (ऑब्जेक्ट प्रेषक, इवेंटएआरजीएस ई) {बिटमैप इमग = नयी बिटमैप (तस्वीर बॉक्स 1। आईजेज); Int width = img.Width; int height = img.Height; के लिए (int y = 0; y & lt; height; y + = 5) {for (int x = 0; x & lt; चौड़ाई; x + = 5) {रंग पिक्सेल रंग = img.GetPixel (x, y); If (pixelcolor.ToArgb () == color.Red.ToArgb ()) {points.Add (नया बिंदु (एक्स, वाई)); } if (pixelcolor.ToArgb () == रंग। रेड.ToArgb ()) img.SetPixel (x, y, Color.White); } pictureBox1.Image = img; } वापसी; } निजी शून्य बटन 2_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {for (int i = 0; i & lt; points.Qount; i ++) {listBox1.Items.Add (अंक [i] .ToString ()); }} निजी शून्य बटन 3_Click (ऑब्जेक्ट प्रेषक, इवेंटएआरजीएस ई) {बिटमैप इमग = नयी बिटमैप (तस्वीर बॉक्स 2। इमेज); इंट विथ = मैथ। मिन (आईएमजी।...

mysql - SQL Query -- Student Weighted Grade Calculation -

I'm having trouble calculating the grades of students to get the final grades My Has the following applause: student ---------------- stu_id stu_fnam stu_lname grade ------- -------- - grade_id grade_name grade_type grade_profit student grade ----------------- stu_grade_id grade_id stu_id grade_arzed gradepress ---------------- grade_type grade_type_name grade_weight This is the query with which I select Select Asti_famem, SST, name, GT. Grade_type_name, SG in Mathematics from Greg, Student S. Inner, as the (round (SM (SG Grid_Archid) / SUM (G. GridPossibil)), 2) * Round ((GT grade / Weight 100.0), 2)) Student grade SG = STI_ID Inner Group on G.GGG.Grade_ID G.Grade_ID Inner Growth Type GP WHERE G.Grade_type = GT.Grade_type Group by Sustu_FammeM, SSTName, GT.Grade_type_name; I get the query report below James | Fort | HW / Quiz | 30.0 James | Fort | Logbook | Robin 60.0 | Hood | HW / Quiz | Robin 60.0 | Hood | Logbook | 25.0 I want to join both together for t...

Google Analytics API - Retrieve Index/Name of Custom Dimension or how many used up -

I have a service that pushes data in GA custom dimension / variable before I push that I want to know what custom sizes are available to push and I do not want to duplicate, so if I have a unique name dimensions (because I will create unique name) I can check on that. Does anyone know how this can be done? I have searched through API documents and it seems that it is not anywhere. Any help would be appreciated! Thanks! You can use the Core Reporting API to get the name of dimensions Then you can see if the price is already stored. Ensure that you do not go with the normal Oauth2.

C++ reading data into array of structures -

I have found a way to read data in my array strokes but I can not control how much it reads. It will teach all the 14 entries in the input file but after that 14 will be read, it continues for some lines and then closes, however, if I keep the code to read the data inside any loop, So much of the printing starts in place of this file instead of joining it. Does anyone know why this happens? There is no way around it The input file looks as follows (skip the dot): The file has 14 sets of data. So, as shown below, 1 set will include Georgia 76.4 for 10, then North Carolina 95.5, 20 and 14 sets. The data in the input file looks like this: Georgia 76.4 10 North Carolina 95.5 20 and so on. The data needs to be printed on the screen like this: Georgia 76.4 10 North Carolina 95.5 20 etc. The problem is that in my code I was trying and failed to read in the input file. #include & lt; Iostream & gt; # Include & lt; Fstream & gt; # Include & lt; Cstdlib...

caching - C++ pool allocator vs static allocation , cache performance -

Given that I have parallel and evenly resized to the following strings: struct matrix {float data [16]; }; Structure Vec4 {float data [4]; } // matrix ARM [256]; // For example // Vec4 arrV [256]; Let us say that I want to repeat sequentially on two arrays as fast as possible. Let's say that the function is something: for (int i = 0; i If I want to store my data as , I will receive the same cash area and performance: a) // aligned stable matrix ARM [256]; Stable Vec4 arrV [256]; Matrix * arramptr = arrM [0]; Vec4 * arrVPtr = arrV [0]; versus b) // aligned char * ptr = (four *) malloc (256 * size (matrix) +256 * sizeof (Vec4)); Matrix * ARMMPR = (matrix *) PTR; Vec4 * arrVPtr = (VAC4 *) PTR + 256 * size (matrix); No matter how much memory is allocated (stack or static allocated) memory cache The ability to be since these two data structures are quite large (1024 and 4096 bytes respectively), the precise alignment of the first and the last elements pro...

revert - how to remove changes since last git commit -

This is probably a simple (but upset) question. How can you remove all changes with the lasting changes? I made a patch, and I wanted to go back to how things were on my previous commitment. I have tried: GIT reset - Hard Master and GIT Checkout Master But Do not remove or remove my folders from files I have added / changed (they are still listed as unclaimed files.) Untracated files are untreated, do not know the guitar or do not care about them. GIT reset - Hard will only return tracked files to the position they were most recently (or name) in the Commit. You can clear git Be careful to remove unwanted files and directories from your work tree that you do not want to accidentally delete any hard work! "Silver Bullet" which will restore a repository to the state again, it is most recently committed, just as it was, it was cloned ( This user will also remove "neglected" user files by the repository! ) This will be: git reset - hard en...

java - Restrict button from being clicked based on the time of the day ANDROID -

I need to restrict a button by clicking on the time of day in my Android app. For example, I do not need to order the app after 9 o'clock, so I want to disable the button after that time. I have seen it in and seen "time now = new time ();" After a method that says that there is an input of time. I tried 900, 9: 00 and 9 .00, no luck, do anyone know how this can be done? My experience with the timing of the link is a little limited, so I'm not sure there are better ways to exist, But how do I do it DateTime now = DateTime.now (); If (now.Gethofed ()> = 21) {System.out.println ("Disable it."); } Else {System.out.println ("Enable it."); } This can also be done with the Java API calendar calendar = calendar.forest (); If (calendar.get (calendar.HOUR_OF_DAY) & gt; = 21) {System.out.println ("it is dysfunctional."); } Else {System.out.println ("Enable it."); } But if you need to work with dates / etc. You ...

html - Run a chain animation on different selectors by clicking once on a button -

I'm trying to run 2 CSS3 animations by clicking on a button. The first animation button rotates and disappears, and the second animation changes the second button, and it looks (the opacity has been changed from 0.5 to 1) and changes its height. The problem is that only the first animation runs. The first animation name is q1leave and the other is the animation name q2show P> To run the first animation I use the # btnq1: target on the CSS and I to run the second animation I # btnq1: target # btnq2a See my code below: HTML code & lt; Div id = "q1" & gt; & Lt; Div class = "q1once" & gt; & Lt; A href = "# btnq1" & gt; & Gt; Button type = "button" name = "" value = "" id = "btn q1" & gt; Click to disappear, and then a different element & lt; / Button & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Butto...

DART: Transformer library "package:di/transformer.dart" not found -

Updated today (April 23, 2014) to the latest version of DART-SDK (1.3.3). The latest DART Editor package has been downloaded in today's date. Advanced Angler Dart for version 0.9.x to 0.10.0 with the following changes: NgController - & gt; Controller NgComponent - & gt; Component ngbootstrap - & gt; The app works with dariatium but it does not work with the pub with the following error: --- 7:21:35 PM running pub build ... --- pub The build fails, [1] Loading source assets ... (0.7S) Loading transformer transformer ... (1.9 S) Transformer Library "Package: D / Transformer Dart" not found. Look in the package: di / transformer.dart and this file is present in my workspace. It is not known what is wrong with it. It is probably related to this dart proxy problem: pub build in one There is a bug for which HTTP_PROXY and HTTPS_PROXY need to be unset. Unx: $ env --unset = http_proxy --unset = https_proxy pub Build Windoze: c: \ & Gt; Set...

shell - Find the closest two numbers and its the distance -

मेरे पास एक फाइल है: 0.000000 0.000051 0.000076 0.000102 0.000152 0.000178 0.000203 0.000229 0.000254 0.000279 0.000305 0.000356 0.000381 0.000406 और मैं दो नंबर और उसके सबसे निकटतम दूरी को ढूंढना चाहता हूं I मैं शैल स्क्रिप्ट का उपयोग कर रहा हूँ उस समय मेरे पास: पॉइंट डैट बिल्ली | कट-एफ 1 | सॉर्ट | Uniq अगले मामले में मैं दो कॉलमों पर विचार करना चाहूंगा। तो एक्स-अक्ष के लिए एक स्तंभ और y अक्ष के लिए एक होगा यह अंक की समस्या की निकटतम जोड़ी की तरह है मजबूत> यह टिप्पणी का जवाब नहीं है। जब आप अपने एल्गोरिथम की जांच करते हैं, तो इस आउटपुट का उपयोग करें। पायथन कोड: आयात करें itertools डेटा = [0.000000, #data [0] 0.000051, #data [1] 0.000076, #data [2] 0.000102, #data [3] 0.000152, #data [4] 0.000178, #data [5] 0.000203, #data [ 6] 0.00022 9, #data [7] 0.000279, #data [9] 0.000305, #data [10] 0.000356, #data [11] 0.000381, #data [12] 0.000406 #data [13] ] के लिए सॉर्ट किए गए में ((एब (आई [0] [0] -i [1] [0]), (आई [0] [1], आई [1] [1])) के लिए मैं आईटीरटोल्स ड...

cloud - Can I use Eucalyptus with two clusters in different places? -

I am learning about Nilgiri in my master's degree and I know that I can use Eucalyptus in the following situation I am City A: All infrasctruct configured with all clusters with cluster, nodes, CLC ... and City B. Can I just install CC in City B and configure it to be part of the city's infrastructure? Have two infrastructure of different places become logical? Bad English All components must be in the same place, as There is a case in AWS. Within each cluster there will be CC () and SC (storage controller) for cluster (hence, for each availability area) and some NC (node ​​controller) It may be possible to walk with CC / SC / The nc (node ​​controller) is in a different location, but the cloud will perform poorly if there is high latency or low bandwidth between locations, and you have to meet, such as multicast.

game engine - Calling a variable outside of a function in python? -

I know that hundreds have been asked before, but I am able to get answers directly from the other questions. do not think so . I need a simple explanation how can I call a variable that was defined somewhere inside the script and inside the function outside of that function. Here's the first script: # Combat Engine Alpha Step # Personal Character Statistics, Strength, Speed, Dexterity, Stir, Experience, Strength, Composition of Levels 1-6 # Shimot Stats Strength 1, Speed 2, Dexterity3, STR4, Experience 5, Power 6SamostStats = (3, 3, 3, 3, 5, 5) #Crepsiac statistics cryptasats = (6, 1, 2, 3, 4, 4) Import time DEF (): Ask = Int (Input ("Do you want to play as Cripescum (1) or Samoth (2)?") Ask if == 1: Prints ("Cripissimum: Strength -", Creepskastats [0], "Speed-", CrepuscStats [1], "Dexterity -", Crypt Stats [2], "STIR -", Crapsstats [3], "Experience -", 4], ask "power -", crapscustats [5]) = intestine (inp...

html - Attaching an Href to a row inside a table -

I am using code in a .php file. I have a statement: & lt; Html & gt; & Lt; TR & gt; & Lt; TD & gt; Hi & lt; TD & gt; & Lt; TD & gt; The & lt; TD & Lt; / TR & gt; & Lt; / Html & gt; How can I add a href to the row? Just knowing how to add a href to the tag was not working? Note: The table was defined in the first code, it is a piece of the line. You do not append the row to href, instead you & Lt; table class = "table table-stripped" & gt; & Lt; Tr class = "selectedRow" & gt; & Lt; Td> & Lt; A href = "#" & gt; Hi & lt; / A & gt; & Lt; / Td> & Lt; TD & gt; Test & lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; Then using jquery: $ ('. SelectedRow'). Click (function () {warning ('do something');}); View

string - Java Method Confusion -

In Java, for example, when you call string1.compareTo (string2), how to compare the comparison method to string 1 is? I see the method in the second string, but how does it compare it for the first time, if it is not being passed? compareTo () is the member function of class string, this means that to implement this function You need an object of type string. So when you call string1.compareTo (string2), it means that you are bringing the string object to ' string1 ' on the Compare () function and ' String2 'as argument.

continuous integration - Error with adding all files with git -

I have tried to use the guit add-on, so that all my files can be added in the past, but now, Now do not work anymore When I command, the console prints: Fatal: Pathspeak '.' The branch master did not match any files, why could this be any input? Is this a file permission issue? Some additional information: This is being made on Travis-CI. First, do not use git add-A without path code . From git help add page: if not & lt; Pathspec & gt; Given the current version of "GIT" "."; In other words, update all the files in the current directory and its subdirectories, this will change to the future version of the default Git, so without the & lt; Pathspec & gt; Should not be used so I'll put git add -A in command. I suggest to change the command. Finally, about the specific problem, I can suggest to look at the value of only $ PWD to see where the current directory of your build system is and check the unseen file...

javascript - CSS Color Overlay PNG -

I thought it would be the answer, but I could not find one. I have a PNG image with a transparent background. Through CSS I want the image (not a transparent background) to turn it into a different color. It should be a way of doing it through the web-kit ... but I have heard that the way is not supported ... is there another way to do this, if not, then How can I get this through the web-kit? For my example, the red ball is a different color ... JSFIDDLE: HTML: Lt; Img id = "ball" src = "http: // www. Clker.com/cliparts/p/0/L/e/j/B/red-circle-solid-md.png" width = 100 height = 100 & gt; EDIT: I need to convert to hex or RGBA, not color! But if the hex is the conversion of a hue or a similar, then it can also work! Thank you all! -liam You can use the hue-rotate CSS3 filter. Change 120deg for your choice. #ball {-webkit-filter: hue-rotate (120deg); }

f# - Can I extend built-in array's indexer? -

I want to add my own pointer to the common array type: type ' However, it gives a compilation error, "it was likely that the expression was typical of type type." [T] But it has type string (FS0001). " Let's do a = [| 1 |] Let B = A. ["Aa"] / / error: fs 0001 give c = a.item ("aa") // this work. I came to know what was asked 3 years ago and it was suggested that this is an FSRP bug. Want to confirm whether this is still the case, or has the specification been updated since? I found this question given by Don Sime: The specification needs to be clarified that the indexers can not be extended for arrays. I would say that he gave the suggestion to allow them best through the best. He said, this is not easy, because array indices have been "created" in the compiler and no F # or IL Metadata is not representative. Therefore it is not supported in Fsharp.

html - !important in css isn't working -

Image
I have tried to override the background of my rows in the table, I did it: & lt; tr style = "background color: # 000099! important;" & Gt; And the result was: I have spent 2 hours on it, I have not done anything everywhere, nothing seems to work, only the work that is done & lt; Style & gt; Td {background-color: # 000099! Important; "} gt; But I do not want to do this, I will have different background colors of the rows, for making different classes for each type of rows. But td.classname is either I want to add it to your COO CSS file because The Kino script will overwrite your CSS: kindo.common.min.css: line # 9 .k-grid Td This is the color of your background which Ducker is the CSS for TD. Edit: You may be searching for: $ (document) .ready (function () {$ (".k-grid td: ('Jan')). ​​CSS (" background-color "," # 000099 ");}); such Looks

javascript - Creating a inside a dynamically -

I am trying to create a div inside a p with a click function. But it seems that I do not want to close my P element, after reading it apparently, it seems that if the P element immediately follows a div in this case, then it does not require the end tag at the end. & lt; Div class = "main" & gt; & Lt; / Div & gt; & Lt; Div class = "content-list" & gt; & Lt; Ul class = "info" & gt; & Lt; / Ul & gt; & Lt; / Div & gt; I am going to attach to this function: var $ contentHandler = $ (". Content-list"); Var $ Mainhanger = $ ("main"); Var $ infoHandler = $ ("info"); Var circle quarter = 1; $ MainHandler.click (function () {var html string = "& lt; li class = '" cyclical + "' gt; var color = & lt; div class = 'circle-color-input' content disabled autocorrect = 'off' & gt; Type a color & lt; / div & gt ;; & lt; /...

go - Bcrypt password hashing in Golang (compatible with Node.js)? -

I have a node for user authentication. I am setting up a site with JS + passport. Now I need to move to the sphere, and need to authenticate with saved user password in DB. The node. JS encryption code is: var bcrypt = require ('bcrypt'); bcrypt.genSalt (10, function (hey, salt) {if (mistake) return next (mistake); bcrypt.hash (user.password, salt, function (hey, hash) {if (mistake) next return (mistake); User.password = hash; next ();});}); How to make the same piece of string in Node.js bcrypt with Golang? After using the text "itemprop =" text "> package, I believe the equivalent will be: hashedPassword, hey: = bcrypt.GenerateFromPassword (password, bcrypt.DefaultCost) Task example: package Main import ("golang.org/x/crypto/bcrypt" "fmt") func main () {password: = [] Byte ("MyDarkSecret") // hashingPassword, hashing password with default cost of heaving: = bcrypt .generateFromPassword (password, bcr...

Web Design - Tables vs css learning web design -

I am currently introducing an introduction to web design class. I am learning to mimic our sites in Photoshop, Then in the dream, Wavez makes the site using Tables. As I have seen the Internet about web design, I am looking at the page about responsible web design about it and using the CSS tables. I think the responsive web design is very complex for beginners. But what about using CSS instead of table? Is one better than the other? And what is an old, possibly old way of designing a table? Table tables are still good for data, but not for the position of graphical elements. If you are looking for a device, then try to quickly generate some code from some PSD. The responsive web design takes something, but I will not say that it is technically difficult. Try hard things, it will make you stronger.

c++ - How to get pixel value of Mat image with webcam capture in OpenCV -

Well, I'm new in OpenCV and image processing and I definitely want help to get every pixel value of Mat I need this image captured by webcam (real time). I have tried some solutions to the problems of some people, but this is not working on my project. This is my code: mat black is white; Mat binary; Mat distance tr; CvtColor (Frame, Black White, CV_BGR2GRAY); Gaussian Blur (Black White, Black White, Size (15,15), 6.5, 6.5); Threshold (Black White, Binary, 80, 255, CV_ DHRESH_BINARY); Mat ionberry = scalar (255) - binary; Distance Transform (Inbury, Distance TR, CVDISTSEL2, 3); And to reach pixel value, I created it: for (int i = 0; i (0,0) == 0) {cout & lt; For the webcam show, I use ("project", distanceTr) As far as I know, distanceTr is a grayscale image, so this is a 1-channel image based on some answers, I tried. & Lt; & gt; But this does not workWaiting: (I'm doing a test case, if (0,0) pixel is black, then it will print 1. Wh...

awk - Formating the output in shell -

After executing some commands in the shell, I get the following output, File1.txt @@ / main / v1 / v2 / v3 / v4 / v5 / v6 / v7 / v8 / v9 / v10 / 5 file2.txt @@ / main / v4 / v5 / v6 / v7 / v8 / V9 / V10 / 4 file3.txt @@ / main / v9 / v10 / 8 Please tell me which command I can apply to get the final output below , Just file name and last 5 characters in each row - file1.txt v10 / 5 file2.txt v10 / 4 file3.txt v10 / 8 Use awk awk -F "[@ /]" '{print $ 1, $ (NF-1) "/" $ NF}' file file1 .txt v10 / 5 file2.txt v10 / 4 file3.txt v10 / 8 @ and / , print the first field Please, print the other previous fields and the last fields. If the tab is required: awk -f "[@ /]" '{print $ 1} \ t "$ (NF-1)" / " $ NF} 'file file1.txt v10 / 5 file2.txt v10 / 4 file3.txt v10 / 8

php - Rewrite rule for a directory to redirect its parent directory in Apace2.conf file -

I need a rewrite rule in the Apace2.conf file so that it redirects the user, For example, when it enters a special directory, www.mywebsite.com/folder then it is www.mywebsite.com Enable mod_rewrite and .htaccess via httpd.conf and then enter this code in your DOCUMENT_ROOT directory under .htaccess : Options + Follow links Multi-View # Riwretbes / Riirret rules Ridraitanjin ^ (. *) $ / $ 1 [L, R = 301, NC]

c# - How to pass variable from textbox to code behind back to same page -

I have a JAX form page and I have a text box that is clicked once and a code Passes the variable and then back to the second element of that page and I can not get it to work. This is the closest I got. & asp: panel id = "search" runat = "server" view = "correct" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; asp: label id = "lbl search" run = "server" text = "search" & gt; & Lt; / Asp: label & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; ASP: Text Box ID = "Search" Runat = "Server" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; Asp: RequiredFieldValidator id = "valSearch" runat = "server" ControlToValidate = "movieSearch" text = "please enter text" /> & Lt; / TD & gt; & Lt; TD & gt; & Lt; ASP: Button ID = "BTSS submit" runat = "server" text = "s...

configuration - Git: Creating alias for "add --update TOPLEVEL_DIR"? -

I'm often typing myself git add -u that has been modified, but for the purpose of joining the entire repository However, when I live in the subdirectory, it becomes tense and tedious, for example, if all of my revisions are in src / but I am currently in the test / access directory I need to type in Git add -u ../ .. The error is prone and slow (because in my code need to calculate the number of ../ ). I would like to create a git alias au , as it automatically detects the upper part (usually, the first ancestor directory in the path in which .git directory). This is not very portable, because I use git for bash Any ideas? No top-level detection is required. You can type in any subfolder: git add -u: / This is less for: git add -u: (above) See : A pathway that starts with the colon: special meaning is. In essence, the major colon: zero or more is done after "magic signature" letters (which alternately ends by another colon...

c++ - Vector subscript out of range (but not really) -

Image
I am using a function to fill the random template (test using doubles) vector: template & lt; Typename T & gt; Zero set list (vector & lt; T & gt; and list) {srand (time (tap)); Int how much, maximum, minimum; Cout & lt; & Lt; "How many items should be generated in the list?"; Cin & gt; & Gt; How many; Cin.ignore (); Cout & lt; & Lt; "Maximum value of the list?"; Cin & gt; & Gt; Maximum; Cin.ignore (); Cout & lt; & Lt; "Minimum value of the list?"; Cin & gt; & Gt; Minute; Cin.ignore (); theList.resize (howmany); T Rand Valley; For (Int i = 0; I & lt; howMany; ++ i) {RAND VALUE = ((((double) RAND () / (double) RAITMX) * (max-min)) + minute; The List [i] = Rand Value; }} The function is said on the vector in the main: vector & lt; Double & gt; Lista; Setlist (Lista); No matter how much "how much" is the price, how do I access the subscript2, I am getting a s...

Firebase iOS Facebook Simple Login error -

I have the same problem after link I have already The correct login is the process of getting login on Facebook by simple login library but error message "A third-party provider error has occurred. View data for details" Sorry for my bad english Do you know how to solve this problem? Check your Facebook app ID and app sequence on the Firebase dashboard Price fires Dashboard login section, registration for Facebook app ID, and your appadiget The consent between your open school in Plist is necessary. (The original poster found a solution and posted for the comment. I have pasted it here for easy search / redo)

c# - Code first, Data is not inserting into database using cascading dropdown list -

In my [HTPT post] method, excluding all the data cascading drop down items, I have joined the department, subject and Section models are: There may be several sections of a department, there may be several sections of a topic. After submitting Jquery Deposit, it shows, the form can not be submitted! So it comes back to the index! Here is my code from the section controller: [http post] [Valid Antiforganic tokens] Make public anecscent (section section) {if (ModelState.IsValid) {db.Sections.Add (section) ; Db.SaveChanges (); Return Redirect Action ("Index"); } ViewBag.DepartmentId = New Selection List (DB Dept., "DepartmentDirectory", "Name", Section Department ID); ViewBag.SubjectId = New Selection List (DB Shabeks, "Subject ID", "Subject Name", Section, Shadam Idi); See Return (Section); } My creation under the Sieakon View. HTML is: @model.models.Section @ {ViewBag.Title = "Create section"; } Action Script {...

c# - Write to a txt file right to left -

I want to write a message in Hebrew in a text file. I tried the following: using (StreamWriter sw = File.CreateText (path + FileName)) {sw.WriteLine (sms); } However, the message goes from left to right, how can I write to the left? A string is an array so that you four [] tempArray = Sms.ToCharArray () Array.Reverse (tempArray) sms = new string (tempArray) When you type, this array should be reversed, it will be read right from left to right.

winforms - how to check the radio button is checked or not in windows form -

Image
itemprop = "text"> I have 3 pairs of radios in my form, I want to see every group of Radiobutton once to see a radiobutan. When the user press the Save button. I used the code below to check every radio button, but I think this is a better way to check. if (radioBttnAddrssCoYes.Checked || rdoBttnAddCorrectNo.Checked) {if (rdoGroundFloorTrue.Checked || radioGroundFFalse.Checked) {if (rdoHomeTrue.Checked || radioMeet.Checked) {// Here I Do something} second {message box} Show ("Please see customer all day at home"); }} And {message box}. Show ("Please check ground floor delivery"); }} Else {MessageBox.Show ("check the address correct"); } Thank you for your support and support I probably would have to separate this bit, but this' T means your way is wrong. if (velated radiogram IIS checked (radio BTN adsource, RWBTNEdactors, not, "check address correct") & amp; amp; amp; amp; amp; amp; amp; amp; amp;;;;;;;;...

bash - Why does "24 > 10#24" generate an error token? -

I have a function workcom that compares two version string and determines that Which is big when I add this surname: alias grep = 'grep -ei --colour = always' My appears to be unrelated part Bashrc file I get this error: -bash: 10 # 24> 10 # 24: Syntax error: invalid arithmetic operator (error token "24> 10 # 24 ") -bash: 10 # 24 & lt; 10 # 24: Syntax Error: Invalid arithmetic operator (error token "24 Note that the error is emitted twice, I'm assuming because the error Has processed twice (ie this is not typo on my part). Note that when I remove the alias, everything works fine, why it works and how can I reduce it? Lines of interest, below, are probably marked: if ((10 # $ {ver1 [i]} & gt; 10 # $ {ver2 [i]})); Then return to 1f ((# 10 $ $ {ver1 [i]} & lt; 10 # $ {ver2 [i]})); Then 2fi Edit: Add more context I use GNU bash, version 3.2.48 (1) -release () I'm doing x86_64-apple-darwin11) on Mac OS X 10.7....

javascript - $scope.$watch doesn't fire when I update from a directive -

मेरे पास निम्न कोड स्निपेट हैं: HTML: & lt; div डेटा-डाऊनलोड डेटा-एनजी-मॉडल = "फ़ाइल" & gt; & lt; / div & gt; नियंत्रक: $ scope। $ watch ('file', फ़ंक्शन (न्यूवैल) {if (newVal) { चेतावनी ("फ़ाइल", नयावाल);}, झूठी); } निर्देशक: कोणीय.मॉड्यूल ('ऐप')। निर्देश ('पुरवाईकृत', फ़ंक्शन) वापसी {प्रतिबंधित करें: 'ए', टेम्पलेटउरेल: './directives/filedrop.html', प्रतिस्थापित करें: सही, गुंजाइश: {ngModel: '= ngModel'}, लिंक: फ़ंक्शन (क्षेत्र, तत्व) {var dropzone = element [0 ]; Dropzone.ondragover = function () {this.className = 'hover'; return false;}; dropzone.ondragend = function () {this.className = ''; वापस लौटा;}; dropzone.ondrop = function (इवेंट) ) {Event.preventDefault (); this.className = ''; गुंजाइश। $ लागू (फ़ंक्शन () {scope.ngModel = event.dataTransfer.files [0];}); वापस लौटा;}}}}}}) ; जब $ $ का दायरा अद्यतन करता हूं तो $ घड़ी फ़ंक्शन कभी ट्रिगर नहीं...

php - yii2 is querying from a wrong table name when login -

I have a database with table users that contains user names and passwords and other information, I have successfully updated my database Connecting the yii2 project was able to get some data, but when I try to log in using the username and password present in host users, then yiiDebugger gives me the exception Confirms: database exception ??? Yii \ db \ Exception SQLSTATE [42P01]: Undefined Table: 7 Error: The relationship "user" does not exist LINE 1: SELECT * FROM "user" WHERE ("user name" = $ 1) and ("status" = $ 2 ) I have the name of the table of users, but this user appears in the query how can I fix this? Have you changed your name? Check the model method table () class user extended \ yii \ db \ ActiveRecord {public static function filename () {return 'user'; }}

objective c - CoreData - Refreshing an object doesn't change registeredObjects count -

I want to clear some of the memory that releases unused managed objects from context. I prefer not to use reset and I want to release single objects using this function: [self .managedObjectContext refreshObject: alarm mergeChanges: no]; Now, if I enter registered object count after this code, then nothing seems to have changed. I still get the same number of items that I have before the call. To help you understand just about the example, this model is a simple description: With a reminder a specific task list Therefore, there are work items and alarm objects related to those tasks. There may be more than one alarm in any work And here is the code, which generates this problem: alarm * alarm = [NSTTAscription Includes New ObjectForternName : Managed object contexts in ENTITY_ALARM: self Management object contexts]; Self.task.alarm = [NSSet set with object: alarm]; [Self saving] [self. Managed Object Contex Refresh Object: Alarm Merge Changes: No]; Since I am ...

ios - UIButton not showing -

Image
In the storyboard - I have set the button as the last overview to stay above the background image. But still - I can not see the button (I think it is hidden under the image) (The second button, mentioning go.png. First one is OK) Edit : Apparently the TableView hides the button, though there is no idea before it in the storyboard? .storyboard snippet: & lt; Visual key = "view" contentMode = "scaleToFill" id = "VfA-cc-yiX" & gt; & Lt; Rect key = "frame" x = "0.0" y = "0.0" width = "320" height = "519" /> & Lt; autoresizingmask key = "autoresizingmask" /> & Lt; subviews & gt; & Lt; ImageView userInteractionEnabled = "NO" contentMode = "scaleToFill" Horizontal Hogging Priority = "251" vertical hashing proxy = "251" image = "background_photo.png" id = "xWd-g0-aHG" & gt; & Lt; rect k...

linux - Why is the kernel using the default block driver instead of my driver's code? -

I wrote a block driver program that creates a dummy block device ( sbd0 ). I registered all device operations for that block device: (see include / linux / blkdev.h in the 2.6.32 kernel source) static structure block_device_operations sbd_ops = {.owner = THIS_MODULE, .open = sbd_open, .octl = sbd_ioctl, .getgeo = sbd_getgeo, .locked_ioctl = sbd_locked_ioctl, .compat_ioctl = sbd_compat_ioctl, .direct_access = sbd_direct_access, .media_changed = sbd_media_changed, .revalidate_disk = sbd_revalidate_disk}; I compiled the driver program, I put the module and created the / dev / sbd0 . Now I want to test my driver code. So I wrote an application below. fd = open ("/ dev / sbd0", O_RDONLY); Retvl = IOCLL (FD, BLKBSZ, and Blocks); Trying to get the logical block size Output is: 4096 I'm surprised: I did not have the For ioctl has not implemented BLKBSZGET . This did not implement my sbd_ioctl , instead it used the default driver and gave me results. It has...

BEGIN blocks in Perl -

Searching the Internet, I think the BEGIN block will be evaluated and executed in the compiling phase. But can @inc or other variables be inherited? Below I've written the test for the directory structure as follows: | - alexpackages | | - alex1.pm | `- alex2.pm | - foo.pl` - main.pl for each file: cat Alex package / alex1.pm package alex1; Sub foo () {print "this is alex1 :: foo \ n"; } 1; cat Alex package / alex2.pm package alex2; Sub foo2 () {print "this is islex2 :: foo2 \ n"; } 1; cat foo.pl alex1 :: foo (); cat main.pl BEGIN {push (@inc, '~ / programmer / perl / alex package '); } Use strict; Use warnings; Use Alex 1; Use Alex 2; # Alex1 :: foo (); # 1. This works fine system ("perl foo.pl"); # 2. This fails The way my program indicates that @inc does not work for a new system call. I think the system call system environment will not be inherited, am I right? And can I create environment variables i...

c++ - TCP socket program to send a Buffer. -

// The code below works fine, but is used to send the string. What changes do I make to send a buffer (address of buffer), which includes the headers with different data type fields? (I'm new to programming. So, excuse me at noob) ClientSocket.cpp ClientSocket :: ClientSocket (std :: string host, int port) {if (! ()) {SocketException ("Could not create client socket."); } If (! Socket :: connect (host, port)) (socket expansion ("could not connect.");}} Client clients & client's socket :: operator (Std :: string & amp; s) const {if (! Socket :: recv (s)) {SocketException ("Could not read from socket");} Return * This;} Simple_client_main Cpp #include "ClientSocket.h" #include "SocketException.h" #Include & lt; iostream & gt; #include & lt; String {int main (int argc, int argv []) {try {client sock client certificate ("169.254.103.63", 30000); std :: string reply; {client_socket > Answer:; ...

Magento Update and Clean Shoping Cart using Ajax -

Two days while trying to do me, but failed. I have a code on the server: & lt ;? Php require_once $ _SERVER ['DOCUMENT_ROOT']. '/app/Mage.php'; Dana :: Application (); Dana :: log ('-----'); Dana :: getSingleton ('Checkout / Session') - & gt; SetCartWasUpdated (true); $ Quote = Dana :: getSingleton ('Checkout / Session') - & gt; GetQuote (); Forex Currency ($ quote- & gt; All Matching Items) ($ quote_item) ($ quote_item- & gt; Set (55); } $ Quote-> Save (); Dana: Logon ($ quote_item); $ Session = Dana :: Milensington ('checkout / session'); Forex Currency ($ session-> getQuote () -> join item ($ item)) {$ productid = $ item- & gt; GetProductId (); $ Productsku = $ item- & gt; getSku (); $ Product name = $ item- & gt; Mix (); $ Product cost = $ item-> getQty (); } Dana :: log ('Product:' $ PRODUCTNAME. 'QUOTITION:'. $ PRODUCER); Dana :: log ('-----'); ? & Gt; ...

matlab - plot in all the subplots at the same time -

I have a figure with 2 subplots. I would like to know whether it is possible to attract similar plots in all subdivisions at the same time (and how). For example, in the following conspiracy, I want to conspirate together (X, Y) and then I would like to move forward separately. fig = figure subdivision (2,1,1) subdivision (2,1, 1) plot (x, z) subplot (2,1,2) plot on plot (x) ( X, y) subplot (2,1,2) plot (x, y) hold, k) You can do this with set as the cell arrays are as follows. See for details. subplot (2,1,1); H1 = Plot (X, Y); Get a handle for% // plot subplot (2,1,2) H2 = plot (x, y); Plot set ([h1; h2], {'xdata'}, {x1; x2}, {'ydata'}, {y1; y2})% // new value: x1 x2 y1 y2

javascript - JSF selectOneRadio item with image, how to set the radio button CHECKED -

I want to get the following UI in JSF. [Radio button] [image] [label] [radio button] [image] [label] [radio button] [image] [ Label] and so on ... The UI looks good after applying the following code, but when I click on a radio button, the selection is not shown in the UI (radio is not checked ), Although the Bean class is updated by value-added events. How can I choose a radio check? JSF Code: & lt ;! - Payment options - & gt; & Lt; Ui: Repetition value = "# {shoppingCartBean.paymentMethods}" var = "m" & gt; & Lt ;! - radio button - & gt; & Lt; div style = "float: left;" & Gt; & Lt; Ice: selectOneRadio value = "# {shoppingCartBean.selectedPaymentMethod}" layout = "page direction" partially submit = "true" change valueEilizer = "# {shoppingCartHandler.valueChanged}" & gt; & Lt; F: select item item label = "item" value = "# {m}" /> &...

c++ - libsvn - svn_client_checkout() -

I'm just trying to do a simple checkout. I think the code will work, and I can compile it. #include "stdafx.h" #include "svn_pools.h" #include "svn_client.h" int _tmain (int argc, _TCHAR * argv []) {svn_error_t * err; Apr_pool_t * pool; Svn_client_ctx_t * ctx; Apr_initialize (); Pool = svn_pool_create (NULL); If (err = svn_client_create_context (and ctx, pool)) {svn_pool_destroy (pool); Return 0; } Err = svn_client_checkout (NULL, "http://tortoisesvn.googlecode.com/svn/trunk/src/ResText", "C: \\ sve", tap, true, CTX, pool); Svn_pool_destroy (pool); Return 0; } But there is a mistake in svn_client_checkout () function on the run. 0x00000000 Use violation during reading I think I forgot to start one of my variables but what else? It looks like the fourth parameter, const svn_opt_revision_t * peg_revision , not optional And therefore no NULL will not do this. Start it eg, such as this should work: svn_opt_revision_t r...

javascript - Removing image src attribute -

एक छवि टैग पर src विशेषता को हटाना नहीं लगता आईओएस (7) या एंड्रॉइड (किटकैट) पर नजर डालने के लिए न तो एक रिक्त मूल्य के लिए विशेषता को बदलता है। अपेक्षित के रूप में डेस्कटॉप ब्राउज़र्स काम करते हैं यह विशेषता हटाता है, लेकिन दृश्य परिवर्तन को प्रतिबिंबित नहीं करता है: $ ('# imgPreview')। RemoveAttr ('src'); यह विशेषता को बदलता है लेकिन दृश्य परिवर्तन को प्रतिबिंबित नहीं करता है: $ ('# imgPreview')। Attr ('src', ''); यदि विशेषता को एक वैध छवि पथ में बदल दिया गया है, दृश्य देखता है: $ ('#imgPreview') .attr ('src', 'http: //some/image/path.jpg'); मेरे पास एक साधारण परीक्षण का मामला है जो इस मुद्दे को दिखाता है। क्या कोई तरीका है कि मैं src को रिक्त स्थान पर बदलने के बाद एक लाल रंग को लागू कर सकता हूं? मूल्य या src विशेषता को पूरी तरह से हटाया जा रहा है? इस तरह का स्निपेट: $। fn.redraw = function () {return.hide ()। शो (0); }; या शायद बेहतर: $। Fn.redraw = function () {return.Each (func...

sql - No waiting while Truncate Table -

I have an SSIS package that runs repeatedly after 1 hour. This package first reduces a table and then populates that table with new data. And this process takes 15-20 minutes. When this package runs, the data is not available to the users. So they have to wait till the package runs. Is there a way to handle this situation so that the user does not have to wait? table. Instead, add audit columns with the data data type, split the table per hour split into this audit column, after loading with the new partition of the new partition, leave the old partition. Ensure that users are directing the proper segmentation with the help of the query audit column

url - WP link rewrite -

How can I remove "category" from this link: Only function Using php I've heard of add_rewrite_rule , but I can not correct it. Update: And add this link category name! is a plugin that I believe hooks on Wp-rewrite file and without modifying core files What do you want

api - php+curl to send a post request with fields -

Image
Trying to send post request to the API, to get an image back. Example url: https://providers.cloudsoftphone.com/lib/prettyqr/createQR.php?user=1003123&format=png&cloudid=asdasdasd& The above URL works well in the browser, if the API does not request / postes, then The result of my code is always Invalid input ' . Code: $ url = 'https: //providers.cloudsoftphone.com/lib/prettyqr/createQR.php'; $ U = RAND (); $ P = rand (); $ Fields = array ('user' = & gt; urlencode ($ u), 'pass' => urlencode ($ p), 'format' = & gt; urlencode ('jpg'), 'cloud' = & Gt; urlencode 'test')); $ Ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ fields); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, incorrect); $ Output = curl_xac ($ CH); Curl_close ($ ch); $ Echo output; One ...