Posts

Showing posts from March, 2013

jquery - $ is not defined error in Selenium test -

I am trying to test the jQuery auto-complete test in a Rail 3.2 application using Selenium. After the one I created, there is a fill_autocomplete helpful method that looks like this: Def fill_autocomplete (area, option = {}) with the FILL_IN field, Option [: with] Page.execute_script% Q {$ ('## {field}'). Trigger ('focus')} page Execute_script% Q {$ ('## {field}'). Trigger ('keydown')} When I run RSpec, I get this error: fill_autocomplete 'crop', with: 'm' selenium :: WebDriver Failure / Error:: Error: Javascript error: $ is not defined The problem is the line page. Execute_script% Q {$ ('## {field}'). Trigger ('Focus')} spec_helper.rb ENV ["RAILS_ENV"] || = 'Test' is required File .expand_path ("../../conf / environment", __FILE__) Requires' rspec / rails' 'rspec / autorun' is required 'coveralls '' Simplecov 'requires' capybara...

ios - Calling my enemy class method from the game scene -

I'm still quite new to programming and what I tried to do is the following: so I have my enemies The scene in a different class separated from the game. In every enemy class.m file I declare six methods, each method represents a new level, which will be called from the game scene. Then in the ways I declare the image of the phantom, path, particle type shooting etc. Here is an example of the level 1 method in the NEMEX.M file: @implementation EnemyClass + (zero) Levels of enemies 1 {Animation = @ "Enemy 1"; SKSpriteNode * Enemy = [SKSpriteNode spriteNodeWithImageNamed: EnemyName]; PathSpeed ​​= 3; CGPathRef Path = CGPathCreateWithEllipseInRect (CGRectMake (0,0400,400), NULL); SKAction * followTrack = [follow SKAction Path: Offset as Path: No Orientopyath: Yes Duration: Path Speed]; SKAction * Forever [repeat repeat term: followTrack]; SKAction * addEnemy = [skeleton runblock: ^ {[AddChild himself: enemy]; }]; SKAction * Enemy's Failure = [Sketch Sequence: @ [An...

javascript - Cal-Heatmap display day with hours from 9-5 only -

I am using to create a calendar. I am doing something to imagine 24 hours a day. I want to imagine that hour between 9 AM and 5 PM only that day. Is there any way to do this through cal-heatmap? var date = new date (2000, 0, 5) var day = new CalHeatMap (); Data: "dates-years.json", start: date, cell size: 40, category: 1, legend: [{itemSelector: "#day", domain: "dayday", subdomain: "x_hour", data: 2, 4, 6, 8]})

php - Getting information about payment woocommerce -

I have a question about Woocommerce: We sell tickets on our website and want to generate a list of those users They are either paid or not. It should look like this: Username / Surname payment / payment was not made Is it possible to do this with Woocommerce? If so, can you expose me with the code possible? :) Thanks advance!

How to compact hard-coding into arrays and for loops in Javascript? -

I have written a function to display some pictures on my site: function Draw_things () {var talker = new array (10); Chief Arrary [0] = {thingTitle: "First thing", Object Description: "Random word", cheese SRC: "Folder / 0.ZipGi", the thing is HREF: "#", Chasertating: '0', Dimensions of things: '644 The object is [1] = {thingTitle: "second thing", item description: "random word", cheese src: "folder / 1.jpg", the thing is HREF: "#", cheerising: '0', the dimensions of the cheeses: '644'}} I have done the above code with 10 elements with hard work. However, I am trying to use a small code like this for loop: function draw_things () {var thingArray = new array (10) ; Var title = ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninith", "tenth...

ruby on rails - Add Collection group with ancestry -

Image
Using Iam with location model If users choose parents to showcase children, then what children Show to the siblings? User _form.html. How can I apply in ARB? class space & Lt; ActiveRecord :: Base is _Naishchery: cache_depth = & gt; The true has_many: end users lineage This process will be relatively simple, considering the ancestor you can get several ways to get it: To pass the related object to what you want to do, change the change in javascript functions make your controls Through which it will give you the required results: # config / routes.rb Resources: Location: End of siblings # app / controller / Sthanon_ controller. RB Class Level Controller & lt; ApplicationController repsond_to: json, only :: Brother sister df siblings @ location = location.fand parameter [: id] response_with @ location.children # - & gt; This will allow you to define AJAX methods to manage feedback from the data: # apps / assets / javascripts / appl...

vba - Macro to export all n set of values combinations of x>n values of range -

To export a combination of several set values, I need a macro to export composites to set data sets of sets In comparison, there will be a smalar. For the exam, I can say that I need all 2 sets of values ​​in the 3 categories of values ​​in the data range. Data ____ Exports AB C____ AB AC Bc BABB ABB BA - All values ​​of the data will be in different cells but each time the comb value should be in each cell. Apart from this, export should be in the form of horizontal form. This is a code that is a bit off for me on the Web, but I can not edit it to use it. Enter the code Sub comb () as dim variants variant, long as variant dim lRow, I have long vElements = Application.Transpose (range ("A1 ", Range (" A1 "). End (xlDown)) column" C: Z "). For obvious lRow = 1, I am going to Ubound (Vietelment) redemption vresult (1 to i) call combinations (vElements, i, vresult, lRow, 1, 1) for I = 1, I end up with sub sub-combination NP (vElements, Long...

ruby on rails - Skip authorize resource in devise -

I am trying to create a user profile in a project that is working on anyone on the web. , So I tried to add skip_authorize_resource: only = & gt; [: Show] However for user control and user model, when I do not see anything on / users / 1 and when I add it to the controller, let me login Indicate; When I add it to the model, I get an error message: undefined method `skip_authorize_resource ' I think you can use the authenticate_user method skip_before_filter: authenticate_user !,: only = & Gt; : Show or you using check_anage method in controller Like this class ApplicationController & lt; ActionController :: Base check_authorities: as long as & gt; : Do_not_check_authorization? Private def do_not_check_authorization? ... End End

html - CSS Class Attribute Selector with hover -

Is this not possible or do I have a syntax error? I have tried to do it in many ways, but nothing works. I have classes works1 , works2 , etc. And I want to define a general hover effect, but the result is that when I try to make it "normal" then nothing really happens it My attitude is, is any sign? div [class ^ = "works"]: hover {cursor: pointer; -Winkit-Filter: Grayscale (0); Filter: Grayscale (0); Webkit-Infection: All 1s ease; -Mozy-infection: All 1s easily; -O-Infection: All 1s ease; Transition: All 1s ease; } Squares are used like this: & lt; Div class = "item col-lg-2 col-md-3 col-sm-4 col-xs-12 Java function 1" & gt; & Lt; / Div & gt; . . The problem here is that your works1 looks different from the class The beginning of the class attribute, so your attribute selector will not work. You can take the name of the class in front of the attribute value or your elements to a normal square so that you c...

jquery - Loading javascripts from external domain with few seconds delay after page load -

Image
I did a lot of research on the Internet, but still I could not find the answer to my problem. I'm basically trying to execute two external Java scripts (hosted on external domains) after 5-10 seconds of being fully loaded on my page I have already loaded Google Maps in IFRAME I'm using a delay script to do this, and it works fine, but it does not know how to delay the loading of two external JS files. Please enter the URL below for coding. See vide. Any help will be highly appreciated. You can use setTimeout: setTimeout (function () {document.write (...); document.write (...);} , 10000)

JSON image to sqlite Android programming -

I'm new to Android programming and I want to ask about JSON / sqlite. I already parse the JSON text and store it in the esclipse and then display the data in a list view in my app. However, I did not parse the images in my JSON file (first started with the easy part). Now I have to parsing the image and I have seen through many websites, but still it is confused about doing this. In the following link I have seen how they parsing the image, but they are caching the images, while I have to store the data in DB. The link contains ImageLoader.java, MemoryCache.java, FileCachee.java and Utils.java; These sections confuse me even more, do I need all of these for images? Will someone tell me what steps should I follow? Thank you in advance To read in a single image, all of you do not require. You only have to read an array of bytes (the contents of the file) and convert it to bitmap objects. Is it useful for everyone to catch a lot of images at a time - to make sure that you d...

How to switch active device with gWidgets tabbed notebook? -

I have created a two-tab GUI with gWidgets. A graph is embedded in each of the two tabs. The problem is that Both articles are sent to tab 2. How can I switch or select an active device? A brief description of the Gwidgets package shows that in using handwriting or using ggraphicsnotebook Ggraphicsnotebook, some unwanted buttons are generated, so I'm thinking how to change it with an add-onler or other methods. A small example is attached thanks. # Library Library (Zid Wits); Library (Cairo device) option (GUIToolkit = "RGtk2") # First tab ---------------------------------- - ------------------------ R. Main & lt; - gwindow (title = "correlation", visible = TRUE) RNB & Lt; - gnotebook (container = r main) rsta & lt; - Group (container = RNB, horizontal = true, label = "static") RDN & LT; - Ggroup (container = RNB, horizontal = fault, label = "dynamic") Ggraphics (container = RSTA) obj.ptNum & lt; - gradio (item = C ...

sql - event scheduler won't turn on (mysql) -

When I tried this code: for 'secret' @ local host Show the socket; This is the result: Grant for the secret @ localhost grant * *. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Give all the rights to the 'secret' @ 'localhost' on 'cryptic _db1x`. * 'Secret' @ 'localhost' But when I want to set event_scheduler to SET Global event_scheduler = "ON" This error shows: # 1227 - Access denied; Then tried this code: on grant * *. * To do this you need (at least one) Super privilege (s) for this work is required; Secret '' Domestic host '' was identified by 'secret'; Flush Pvt .; and then error: User denied 'login' to 'localhost' (using password: yes) I know that I am using the root, I have used the username and password to access the control panel of my domain. check this I think you need the code: * A...

css - How to change transparency of background image using javascript? -

I have a repeat opaque background for an element, I should be able to change the ambiguity for the background image using Javascript. I want to adjust image opacity based on the scroll position. I found this link to do so after using the "CSS" after the pseudo class: But it seems that I do not change the properties for pseudo classes using espionage Can anyone know how I can get it? Try something like this: HTML: & Lt; Div id = "img" & gt; & Lt; / Div & gt; CSS: #img {background: url (enter your image file url here); Width: 100%; Height: 100%;} javascript: document.getElementById ("img"). Style.opacity = 0.5;

python - Cython comiplation error gcc failed with exit status 1 -

I'm a new Python user. I try to install the package scikits.sparse However I could not install the package. I'm a Windows user and using Python 2.7.6 P> I typed in windows CMD: dragon setup.py build_ext --inplace --compiler = mingw32 Although I get errors, compiling the syntax files and setup to exit the error: The exit of the command "GCC" failed in position 1. I I have installed Cython properly and Mingw32 / bin is also in my environment variable path I It will be greatly appreciated if someone can help me, I really need the package!

android - Does anybody know what this ui element is called? -

Src - This works like a toggle button, but it switches to the circle state. Is this a view from a custom view or a real Android library? This is the closest thing on Android: a switch is: The example you posted is either a custom style or a switch with a custom UI element.

ios - How do I assign a textcolor to a label from an array of colors? -

I'm trying to create one of the UILabel five colors - (zero) viewDidoadload [[Super Viewedload]; NSString * Random Collar = [ColorRayezObjectOntIndex: ARC4Random ()% [Color Count]]; Color = [[NSARLALO] Init]; [UIColor redColor], [UIColor bluecolor], [UIColor greenColor], [UIColor yellowColor]; ColorLabel.textColor = Random Color; } How do I set an orange for the text of the label as UIColor ? Sorry, if it has already been answered, then I can not understand it correctly to understand it correctly. try it ... define #Concolor4 - (UIColor *) Random Caller {NSInteger colorIndex = arc4random ()% kNumColors; UIColor * color; Switch (Color Index) {Case 0: Color = [UIColor blueColor]; break; Case 1: Color = [UIColor redColor]; break; Case 2: Color = [UIColor yellowColor]; break; Case 3: Color = [UIColor greenColor]; break; } The color of the return; } To assign a random color ... colorLabel.textcolor = [auto random color];

c# - Refresh view after EF LoadAsync -

Considering the large set of data to be loaded, I want the UI to be responsive when loading data. There is currently only one work code which refreshes continuously URI which is not desired. How is the data loaded in the non-UI thread and found on the last update? Private static object sync_lock = new object (); Private zero load () {MyEntities DB = new MyEntities (); TestEntityViewModel testEntityViewModel = (TestEntityViewModel) FindResource ("testEntityViewModel"); TestEntityViewModel.Source = DB TestEntities.Local; // Source is viewable select & lt; TestEntity & gt; Binding operation Enabled compilation synchronization (testEntityViewModel.Source, sync_lock); Db.TestEntities.LoadAsync (). Continue (New Action & Lt; Tasks & gt; (t) = & gt; {this.Dispatcher.Invoke (New Action ((=) (see; MoveCurrentToFirst; Commandmanager .invalidateRequerySuggested ();}) );})); } Note: If I remove the call at EnableCollectionSynchronization , the data will l...

how to hide wordpress submenu page -

I have to hide some subpages from my plugin menu, my plugin is the menu code Add_manu_page ($ page_title, $ menu_title, $ capacity, $ parent_slug, "addProduct", tap, 21); Add_submenu_page ($ parent_slug, $ page_title. "", "", $ Ability, $ parent_slug, ""); // Product section add_submenu_page ($ parent_slug, $ page_title. "- Add product", "Add product", $ ability, $ parent_slug. "-add-product", "addProduct"); Add_submenu_page ($ parent_slug, $ page title. "- View Product", "View Product", $ Capability, $ parent_slug. "-View-Product", "View Product"); Add_submenu_page ($ parent_slug, $ page_title. "- Edit product", "Edit product", $ ability, $ parent_slug. "-Edit-product", "EditApplication"); Add_submenu_page ($ parent_slug, $ page_title. "- Delete product", "Edit product", $ capacity, $ parent_slug. ...

javascript - Unable to make modal box appear using JQuery -

After using jQuery I'm trying to open a model box after clicking. I can open the box using a hard link, but when the user clicks on the image I have tried to experiment. Show but it's not right? For example Bela here Using the code structure below. O etc. should recognize how the pictures are identified that they can be clicked on. I know that this is a cheat, question, but I am not getting the anser I need anywhere. $ (document). (Function () ($. 'Go img'). Css ('cursor', 'pointer'); $ ('go to') ('click', 'img', function (e) {$ (This Wide (100). High (100) .appendTo ('# modal-show'); $ ("# modal-show") Show ("slow", function () {// animation complete.}); Sevmeibj (); Return Back;});}); Certainly here you have got a work demo. I noticed that you could get some extra stuff like SaveMyBadge (); has updated Bella. & lt; A href = "# modal-show" title = "Clicking it shows...

vb.net - Cannot update Access database via VB 2010 -

The school is busy working on a project and we have almost completed it. The table adapter is connected to a VB2010 program to access 2010. PROBLEM: When the program is running from Visual Studio 2010, then we will be able to update & amp; Insert the record is OK but when I create an established file, install it on my PC, it runs the program, but only allows you to view it (through the form) through the record, but as soon as we Try to update / insert, it returns an error (one exception which we handled) is the code from one of the forms below: Actually just want to get it working, etc. Has been struggling for a long time public class EditProducts_Form Private Sub Products_Form_Load (ByVal as the sender. System.Object, ByVal systems such as e. EventArgs) MyBase handle. 'Try' TODO: This line of code loads data in the 'ChaosComputers_DatabaseDataSet.CC_Products' table. You can move, or remove it, as needed. Me.CC_ProductsTableAdapter.Fill (Me.ChaosComputers_D...

php - Regular expression to find a string included between two bars and containing certain words -

After learning this I always forget the correct regex. I want to remove the ISBN number from the string. string: english | ISBN: 1285463234. 2014 | 49 9 pages. PDF | 28 MB Goal to remove: 1285463234 You can try the regex below to remove the ISBN number, ISBN: \ s * \ K \ d + Your PHP code will be, & lt ;? Php $ mystring = 'english | ISBN: 1285463234. 2014 | 49 9 pages. PDF | 28 MB '; $ Regex = '~ ISBN: \ s * \ K \ d + ~'; If (preg_match ($ regex, $ mystring, $ m)) $ $ yourmatch = $ m [0]; Echo $ yourmatch; }? & Gt; // = & gt; 1285463234 Explanation: ISBN: string ISBN: \ s * matches zero or more spaces. \ k discards previously matched characters (i.e., isbin: ) \ d + matches one or more digits.

ruby - Strictly convert string to integer (or nil) -

For web programming, the number comes in the form of string but to_i is passed to " 5abc "from to 5 and " abc " to 0 . To catch these two incorrect answers, I wrote: def number_or_nil (s) number = s.to_i number = zero if (number.to_s! = S) return number expiration Is there a conservative and more natural way of completing this conversion and is finding out that the string is not to be used as a number? integer ('5 BCI)') # = & gt; ArgumentError: Invalid value for integer (): "5abc" integer ('5') # = & gt; 5 If you want the behavior to be returned to that number, even if no string can be changed, you will still need your number_ or_nil method. def number_or_nil (string) integer (string || ''), rescue argument error zero end You should be careful to avoid any special exception . A bare defense (such as "Rescue zero") will be avoided by any error that is obtained from standard error an...

javascript - Select2 Custom Matcher for Non-Adjacent Keywords -

I use in my app to allow for a dropdown search with 1200 options I am currently using the default implementation of Select2, which are adjacent to search results, until the keywords are imminent: function (word, text) {Return Text.toUpperCase () IndexOf (term.toUpperCase ())> gt; = 0; } For example, 'Stackworflow Question' returns the option of 'Stackoverflow Question' about 'Return Option' I still like results based on non- I will return - For the small keywords, for example, I also like that the above option will be returned when searching for 'Stackoverflow Selection 2'. Does anyone have the idea of ​​creating custom matures for this idea? " , select2 stack overflow , stack overflow selection 2 question , question About Selection 2 & lt; Select Id = "e17_2" style = "width: 300px" & gt; Option alt = "About selection 2 Stackoverflow question "& gt; stack overflow question about...

c# - How to ensure that async method finished work? -

I am very new to threads, so my thoughts and questions can be a bit silly :) I fill out the WinForm control with data from another thread, so I have to call the applicant () when I'm trying to use the control. If I correctly understand, treeView.BeginInvoke (/ * some action () * /) this takes action Run in the main thread but I "fire and forget" this BeginInvoke () , so I do not know when the work has actually been done. And even when the worker thread stops and returns the execution on the main thread, then I can not be sure that all BeginInvoke () methods have completed the execution. This is the reason why after returning to main, I can not manage the thread with the control on which I BeginInvoke () . The real problem is TreeView.ExpandAll () does not work. Take a look at the code snippet below. Private zeros btnGetTree_Click (Object Sender, EventArgs e) {var treeViewWriter = New thread ((=); UpdateTreeview (New AddXmlNodeArgs (di, n...

unix - Double exclamation in bash script -

I know that when double exclamation is printed, it executes the previous command. But echo !! Some strange results that I do not understand. For example, when commands are typed in the command, it also prints the echo as part of the output echo $$ !! It prints the output below: $ echo per resonant 3150 (why does echo before each output?) When you use history replacement, the shell first represents the command, which is about executing with all the depositions shown, and then executes it. That's because you can see what the resulting command is, to confirm that it is expected by you. So if you type: Echo some commands !! !! is replaced with the contents of the previous command, it displays and then executes some commands

java - Disable group of radio buttons -

मेरे पास रेडियो बटन हैं जो ' बटन ग्रुप बीजी 1; ' का उपयोग करके ' Javax.swing.ButtonGroup 'पैकेज मैं इस समूह को अक्षम करना चाहूंगा ताकि उपयोगकर्ता ओके बटन ' btnOK ' पर क्लिक करने के बाद अपना चयन नहीं बदल सकें। इसलिए मैं इन पंक्तियों के साथ कुछ खोज रहा था: निजी शून्य btnOkActionPerformed (java.awt.event.ActionEvent evt) {bg1.setEnabled (false); } हालांकि, .setEnabled (false) मौजूद नहीं है। मैं इस समूह को अक्षम करना चाहूंगा बटन समूह दृश्य घटक नहीं है इसका उपयोग बटनों के सेट के लिए एक बहु-अपवर्जन अवसर बनाने के लिए किया जाता है। वही बटन समूह ऑब्जेक्ट के साथ बटनों का एक सेट बनाना मतलब है कि उन बटनों में से एक "चालू" करने से समूह के सभी अन्य बटन बंद हो जाते हैं। आपको प्रत्येक JRadioButton को बटटॉन्गुप में जोड़ दिया गया है क्योंकि बटन समूह में ऐसा कोई भी नहीं है पूरे समूह को अक्षम करने की विधि। नमूना कोड: गणन & lt; AbstractButton & gt; गणना = बीजी 1.एज एलेमेंट्स (); जबकि (एन्यूमरेशन.hasMoreElements ()) {en...

c# - How set UnityContainer.Resolve<IType>() types precedence? -

UnityContainer में प्राथमिकता कैसे सेट करें? उदाहरण के लिए, एकता को कैसे बताना है कि मैं IVehicle को बस को हल करना चाहता / चाहती हूं, नहीं कार में निम्नलिखित उदाहरण? var मूल = नया यूनिटी कंटनेर (); माता-पिता। पंजीकरण प्रकार & lt; IVehicle, कार & gt; (); / * ... * / var बच्चे = parent.CreateChildContainer (); बच्चे। पंजीकरण प्रकार & lt; IVehicle, बस & gt; (); // अब मैं बस जाना चाहता हूं, नहीं कार: var उम्मीद हैबस = बाल। रिज़ोलिव & lt; IVehicle & gt; (); आपका वर्तमान उदाहरण के रूप में, यह काम करना चाहिए, यह इसलिए है क्योंकि आप एक बच्चे के कंटेनर में टाइप पंजीकरण, जिसे आप उदाहरण के रिजॉल्यूशन के लिए उपयोग कर रहे हैं, इसका परिणाम बस । यूनिटी कॉन्टैनेयर उदाहरण के लिए, आपके पास दो विकल्प हैं: एक को माता-पिता के लिए & lt; IVehicle, Bus & gt; के एक नए प्रकार के मैपिंग को जोड़ना है और इसके बाद संकल्प करना है, यह पहले के & lt; IVehicle, कार & gt; प्रकार मानचित्रण को अधिलेखित करेगा। दूसरा विकल्प नामांकित पंजीकरण का उपय...

php - ZF2 - Merge assets using Apache's AliasMatch -

मेरे पास ZF2 अनुप्रयोग के लिए निम्नलिखित अनुप्रयोग संरचना है: myapplication - & gt; Config - & gt; डेटा - & gt; मॉड्यूल [यह निर्देशिका खाली है, क्योंकि मेरे सभी मॉड्यूल विक्रेता विक्रेता में हैं] - & gt; सार्वजनिक - & gt; .htaccess - & gt; index.php - & gt; विक्रेता - & gt; मॉड्यूल 1 - & gt; संपत्ति - & gt; सीएसएस - & gt; जे एस -> छवि -> - कॉन्फ़िग - & gt; src - & gt; दृश्य - & gt; Module.php - & gt; ; मॉड्यूल 2 - & gt; संपत्ति - & gt; सीएसएस - & gt; जेएस - & gt; छवियों - & gt; रूपांतरण - & gt; स्रोत - & gt; दृश्य - & gt; Module.php - & gt; मॉड्यूल 3 - - & gt; संपत्ति - & gt; सीएसएस - & gt; जे एस - & gt; छवियों - & gt; कॉन्फ़िग - & gt; स्रोत - & gt; दृश्य - & gt; Module.php जैसा कि आप देख सकते हैं, मेरी सभी संपत्ति फ़ाइलों को अच्छी तरह से अपने मॉड्यूल में व्यवस्थित किया जाता है। हालांकि, मुझे निम्न यूआरएल का उपयोग कर किसी भी संपत्ति को सुलभ होन...

.net - Visual Studio 2013 Browser Link is not showing other options but Refresh -

Image
I'm taking a look at Visual Studio 2013 and it seems that there should be other options for connected browsers, such as Design Mode and Inspection Mode . But for me, it's just showing refresh . I Update 2 V.S. I am using 2013. This project is an ASP.NET MVC application, which is enabled and debug with .NET 4.5 in the web.config file. Am I missing something? All you need to do is show the latest action Vs2013 alone Bundled all the additional things as part of the web extension There are different extensions.

ruby - Rails Joins through a module -

I have a lot in my model to list all 'places' in my model with a "post" Something trying to make it easier to add. Currently, each post has_many: places,: through = & gt; : Location_post . I am using the 'Blogite' gem, which posts a module in 'Blogit :: Posts'. I get a wrong logic type class (expected module) error when I try to run the following in my Post.rb model: module blogit class post & lt; ActiveRecord :: Base before_save: reuse_existing_locations def reuse_existing_locations current_space = location.include (Blogit :: Post). First end How can I connect through a module? Thanks in advance! I'm not sure why I think you're trying to do some notes and Overview: By looking at it, it is clear that Blogit :: Post is a class, not a module. Add takes the method module (not square), this is the error you are seeing. You are calling included method to location model and what makes me feel weird is ca...

handling matrix in R -

I have such data SB1 SB2 SB 3 db 1 db2 db 3 dB 4 dB 5 fb fb 2 fb 3 fb 4 sb 1 ... -45 32 -4 10 -13-9 12 -45 -4 -43-2 -2 sb 2 45 ... 30 70 55 60 16 20 22 48 0 8 SB 3 -32 -30 ... -26 - 40 -10 -14 31 -10 -82-97 -4 dB 1 4 -706 ... -5 2 7 32 -4 0 -45 0 DB 2 -10-55 40 5 ... 2 3 26 -43 0 - 43 0 DB3 13 -60 10 -2 -2 ... -3 29 20 -4 -6 0 DB 49-61 14-7 - 3 3 ... 20 19 -30 -8 0 DB 5 -12 -20 -31 -32 -26 -29 -20 ... 0 -20 -23 -20 FB 1 45 -22 10 4 43-20-19 0 ... -20 -20 -20FB 2 4-48 82 0 0 4 30 20 20 ... 0 FB 3 43 0 97 45 43 6 8 23 20 0 ... 0 FB 4 2-84 020 20 0 0 ... What do I need The negative number is removed from the matrix and can be done with this command: Apply (difference, 2, function (x) {ifelse (x However, this code removes both negative "N ..." which I want for further calculation. How can I remove negative but still preserve "..."? I have tried this code applied (inter base -2.2, function (x) {ifelse (x> 0% x% in% "...", x, 0 }}) but i...

multithreading - C++ How to correctly use threads with a while loop -

I'm new to thread, but I've been reading this for the past few days and now I'm trying to make it one To implement in the actual example. I have a GUI class that should start a thread on the click of a button. My implementation is following: zero interface :: on_startbutton_clicked () {theDetector.start (); } Zero Interface: on_stopButton_clicked () {// Not sure how to stop the thread} The detector class has the following code: zero Detector :: Start () {thread T1 (and detector :: detection, thread, this); T1.detach (); } Zero Detector :: Detect Thread () {isActive = true; I think this is not correct The way to do this is, if I separate the thread, then I can not stop it through boolean and if I am involved in it immediately after being suspected by the GUI, what would be the right way to do this example? should be a designer a std :: unique_ptr & lt; Std :: thread & gt; PThread; and a std :: atomic & lt; Bool & gt; Halt; . Sta...

c# - Complex LINQ to SQL query to return List<T> -

I'm writing a WP 8 that will return the list to the WCF service. I want to select all teachers from the database and then I would like to return to each other from the list created, which will show 5 teachers whose maximum income ( maxInc ) is the closest to me ( MyMaxInc ). For example, if MyMaxInc = 200 and I have 225 with user, user 2 240 and user 3 to 210, then in the returned list the teachers will be shown in the following order: user3, user, user2 Mary Service implementation: public IEnumerable & lt; MTeachers & gt; GetStuffList (integer MyMaxInc, int MyMinInc) {list & lt; MTeachers & gt; StuffList = new list & lt; MTeachers & gt; (); DataClass1DatatUntext Data = New DataCall 1Datacentax (); Int inc = 0; & Lt; MTeachers & gt; Final list = new list & lt; MTeachers & gt; (); {"DTistjob ==" Teacher ") {stufflist.Add (new mTeachers (d.stuffName, (int) d.maxInc, (int) d.minInc," teacher ", Inc.)); Ink ++;...

latex - knitr chunk option code to input code into a chunk does not work in R 3.1.1 with knitr 1.6.10 -

मैं knitr 1.6.10 में R 3.1.1 । चक विकल्प कोड ऐसा लगता है कि काम नहीं करता है मेरा MWE में .nw प्रारूप नीचे है: \ documentclass {आलेख} \ आरंभ {document} & lt; & lt; संकुल, = FALSE, कैश = FALSE & gt; & gt; = पुस्तकालय (निट) पुस्तकालय (प्रारूप आर) @ & lt; & lt; परीक्षा, कोड = प्रारूप आर :: उपयोग (एलएम), eval = FALSE & gt; = = @ \ end {दस्तावेज़ } पहले यह फ़ंक्शन काम कर रहा था (), लेकिन यह काम नहीं कर रहा है-हालांकि formatR :: usage (lm) कामकाजी कोड के बाहर काम कर रहा है। किसी भी तरह की सहायता की हम सराहना करेंगे। Thankis ने कहा है कि formatR संस्करण होना चाहिए> = 0.10.3 , जो एक विकास संस्करण है। devtools :: install_github ('yihui / formatR')

extjs3 - Unable to view extjs script in browser -

I am not able to see extjs js code in my JS page. Opens in the browser with the page title that I gave in the title tag. But the script is not found in the body, anyone can identify the error code below. Please help me identify this problem. "Text / html" page encoding = "UTF-8"%> & Lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "js / ext-3.2.1 / resources / css / ext-all.css" & gt; & Lt; Script type = "text / javascript" src = "js / ext-3.2.1 / ext-all.js" & gt; & Lt; / Script & gt; & Lt; Title & gt; Euggets learn & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script type = "text / javascript" src = "...

java - Get specific pixel from 1D pixel array -

I have a pixel array that has many colors. int w = 32; Int h = 32; Int [] pixel = new int [w * h]; As you can see, the image of this example has 32x32 dimensions, all the pixels are stored in one-dimensional array. For example, I want to pick pixels from coordinate (5/0), that means the fifth element in the first line of the image. The problem now is that I have got one dimensional pixel array Otherwise, just call me int target = pixels [5] [0]; How can I get this specific pixel from a one dimensional array? like this: public int getPixel (x, y ) {// W is your width (number of pixels in line) == 32 return pixels (x + w * y); } It assumes that the pixel data is stored in the order-line-line, so you "leave" in the right row (which is "height" x (row per pixel Number)) and then add column

What's the effect of "int a(); " in C++? -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब Int a (); सी ++? क्या यह int a या int a (0) ? और कैसे के बारे में char c () और डबल डी () ? int a (); में सी ++? का प्रभाव क्या है पैरामीटर, जो एक पूर्णांक देता है। क्या यह int a या int a (0) के बराबर है? नहीं इनमें से प्रत्येक पूर्णांक प्रकार का एक चर घोषित करता है; दूसरा यह भी मान शून्य के साथ आरंभ करता है। और कैसे के बारे में char c () और double d () ? धन्यवाद। ये विभिन्न रिटर्न प्रकार के साथ कार्य भी घोषित करते हैं।

packing - How to get the DEBIAN/debian folder from a ".deb" package? -

I would like to know how the DEBIAN / debian folder can be obtained from the ".deb" package. I found that decompressing like ".deb" package to Decompressing like P7zip or dpkg only decompress the software which is going to be installed, and I was thinking that a software can be all free / open source etc. , But how can you ensure that there is no malurory post / preinstall script in the ".deb" package? "post-text" itemprop = "text"> you want dpkg -e path / to / deb For more information, see.

Python error escape "socket.error: [Errno 54] Connection reset by peer" -

I'm running some doses running through some domains and it is checked It seems that it is completely okay from different sources, but I am getting the error mentioned in the title. How can I survive this? I am using HTTP terror and URL terror, but it is still hanging. Any help on this will be great def get_html (link): import urllib2 urllib2 Import request, Urlopen, URLError, HTTPError: res = urllib2.urlopen (Link) html = res.read (): Exclude URLRR: Exclude return link to HTTPError e: return link Edit: Attached error is file "/ library / framework / python framework / version -7.7 / lib / python2.7 / urllib2.py", line 127, urlopen return _opener.open (url, data, timeout) file "/ library / framework / Pth. Framework Skrn -2.7 / LB / Paithon 2.7 / Arelaibi 2 "", line 404, = self._open open response (Rik, data) file "/ Library / Frameworks / Python. Framework / Version / 2.7 / Lib / Python 2 / / urllib2.py ", line 422, _open '_...

Implement "File open in folder" feature for my C++ application in linux -

I am trying to implement the "Open in folder" functionality that you have seen in Firefox and download managers. This is the code I have picked up so far, and I have decided to use the Nautilix program to open the file. int file :: openTempFile (std :: string temp_file_dir) {std:: string file_path = temp_file_dir + "/"; File_path = file_path + this- & gt; Additional_info; // If you already have a temporary file, delete it // if (temporary_file! = "") {//: TODO: open temporary file stack // // when app deinit we remove those // (Temporary_file.c_str ()); } / * Write temporary file * / file * fp = fopen (file_path.c_str (), "w"); If returned (fp == NULL) wrong; Filitt (m_data, 1, m_size, fp); Fclose (fp); // Now open it using Netlus / Four * Permalink [] = {strdup ("nautilus"), strdup (file_path.c_str ())}; Int pid; If ((pid = fork ()) == -1) Pillar ("Kanka Fail"); If (pd == 0) {int a = execvp ("notilis", pe...

f# - Compiler can't tell which record type with duplicate fields should be the function parameter type -

In my program there are some record types with some field names (each record type means something different). The compiler says that the function parameter matching this record size should be declared as last, even if I declare events in the record with clear field names, and always going through a constant type in each function I am Is there a proper way to deal with this? I know that I can put a type of annotation on the function, but I think if I am working correctly, then I will not need to fight the compiler with type annotation. Minimum code problem: type type1 = {x: int} type type2 = {x: int} let's getX t = tx getX {type1.x = 1} | & Gt; Compiler output: $ fsharpc --nologo test.fs /tmp/typetest/test.fs(7,6): error FS0001: this The expression was expected to be type type 2 but type type1 here there are some Methods of Nearby: Type the annotation as you suggested: Let getx (t: type1) = tx Set the getX before the defined type: type1 = ...

ios - Memory Warning Whenever Saving To iPhone Photo Album from UIImagePickerController -

I am working on an application that allows the user to take a picture by tapping on the screen. Whenever they tap, it calls the UIImagePickerController's 'Le Picture' method, then in the delegate controller, in the 'DidFinishPickingMediaWithInfo' method, I do: UIImage * image = [For information object: UIImagePickerControllerOriginalImage]; UIImageWriteToSavedPhotosAlbum (image, zero, zero, zero); Every time I do this, even if the tap is too far, I get a memory warning. The application is not crashing, but if possible, I want to optimize the display. I know that it should be allowed because the camera itself creates it and saves the photo album every time. I do not really care about quality optimized, so images with images help first?

oracle - What is the purpose of this SQL syntax (AS XYZ NUMBER)? -

I am studying this PL / SQL code, and the beginning section looks like this: Create or Reverted Action Part Tmpvar NUMBER as ADELS_SPROC_NAME (p_batch_mod_ind IN VARCHAR2, ... / * etc etc * /); I do not know ASTMVR NUMBER; What is the section doing? what is this? AS (or IS ) your announcements The beginning of the section shows that in your Announcements section, you are declaring a local variable tmpVar type NUMBER . Generally, there are many variables declared in your manifesto section. The skeleton of your process is something like the process of creating or changing & gt; & gt;) AS & lt; & Lt; Local variable declared & gt; & Gt; BEGIN & lt; & Lt; Do something & gt; & Gt; END & lt; & Lt; Process name & gt; & Gt ;; AS is nothing directly with the announcement.

r - Remove rows that match a value -

I'm trying to filter some data. I say that columns have a numeric value, if all the columns Should be equal to zero. Although I am about to perform several matches, with which such a match1 & lt; - Match (which ($ FATALITIES storms == 0), which ($ INJURIES Storm == 0)) match2 & lt; - Match (Joe (storm $ CROPDMG == 0), which (Storm $ CROPDMGEXP == 0)) match 3 & lt; - Match (which ($ PROPDMG Storm == 0), which ($ PROPDMGEXP Storm == 0)) matches 4 & Lt; Match (match 1, match 2) matchiff and lieutenant; - Match (Match 4, Match 3) But this clearly does not work since giving the last vector status ... Data looks something like this: BGN_ DATE STATE EVTYPE Fatalities Injections PROPDMG PROPDMGEXP CROPDMG 1 4/18/1950 0:00:00 AL TORNADO 0 15 25.0 of 3 2 4/18/1950 0: 00: 00 El Torrena 0 0 0.0 0 3 2/20/1951 0:00:00 El Torrena 0 2 25.0 K 0 4 6/8/1951 0:00:00 El Torrena 0 2 0.0 K 5/11/15/1951 0:00:00 El Torrena 0 0 0 0 0 0 6 6 11/15/1951 0:00:00 El Torrena 1 6 2.5 K...

javascript - If Value is Equal to Anchor's Text then Change it's CSS -

बेला 1 = = बेला 2 = मेरे पास एंकर का एक सेट है जिसे मैं क्लिक करता हूं एक चयनित तत्वों को बदलना सीएसएस (इस मामले में फ़ॉन्ट-परिवार विशेषता) मैं क्या करने की कोशिश कर रहा हूं, एक पाठ बॉक्स में फ़ॉन्ट टाइप करें और यदि फ़ॉन्ट एंकर सूची में फोंट में से एक है पाठ के अनुसार सीएसएस को बदलना। मैं इस तरह से कुछ की एक विधि का उपयोग करना चाहूंगा, जहां इनपुट मान सीएसएस के बदलने के लिए लंगर के पाठ के बराबर है, लेकिन यह बिल्कुल निश्चित नहीं है कि कैसे इसके बारे में जाओ। $ ('हड़पने वाले फ़ॉन्ट-परिवार')। पर ('कीप परिवर्तन', फ़ंक्शन () {$ ('। हड़पने वाला टाइपोग्राफी ए')। सीएसएस ( 'पृष्ठभूमि रंग', '# 444'), यदि ($ ('। हड़पने टाइपोग्राफी ए')। पाठ () === $ (यह) .val ()) {$ (this) .css ('backgroundcolor', '# 1c1c1c');}}); मैंने इस विशेषता को शीर्षक विशेषता का उपयोग करने की कोशिश की, लेकिन जब मैंने एरियल ब्लैक , या andale mono उस ऐन्च्छक को उस शीर्षक । यह पृष्ठभूमि बदल नहीं था। ('कुंजीपटल परिवर्तन', फ़ंक्शन () {$ (...

d3.js - D3 Force Layout Variable Repulsive Foces -

I am working on a graph that contains variable size nodes: (click on F2 to start the force layout Do) Is it possible to change counteractive forces on the runtime by node size? In fact, I'd like to encourage layout overlapping nodes ... Force layout lets you create a function Allows you to specify the charge strength for each node, the node and its indicator are passed as logic. If you make your nodes data in such a manner that each element has an accessible property that represents its shape (called radius of a boundary circle) , Then you use this data to determine a relative charge value. For example, if each element in your data represents an asset of its property, it can do something like: / P> var force = d3.layout.force () .Node (nodes). Size ([width, height]). Charge (Task (D) {Return-5 * Dr;}). On ('Tic', Tic) Start (); One factor of -5 is completely arbitrary, and you have to choose a value that works well for your data. Positive values ​​r...

java - org.apache.http.ProtocolException: Target host is not specified -

I have written a simple httprequest / response code and I am getting this error below: I used to type in my classpath httpclient, httpcore, common -Codecs and general logging. I am very new to Java and I do not know what's going on here. Please help me. code: import org.apache.http.client.HttpClient; Import org.apache.http.client.methods.HttpGet; Import org.apache.http.HttpResponse; Import org.apache.http.impl.client.HttpClientBuilder; Import org.apache.http.Header; Import org.apache.http.HttpHeaders; Public class UnshorteningUrl {public static zero main (string [] args throws exception {HttpGet request = zero; HTTP Client Client = HTTP ClientBuilder.credit (). Build (); Try {Request = New HTTP Gate ("trib.me/1lBFzSi"); HttpResponse httpResponse = client.execute (request); Header [] header = httpResponse.getHeaders (HttpHeaders.LOCATION); // Preconditions.checkState (headers.length == 1); String new url = header [0] .getValue (); System.out.println ("new url...

Ada + POlyORB: lookup failed in the naming server -

I am trying to create a distributed application using DSA in ADA and end me a few hours after trial and error In order to compile it correctly, however, now I'm having problems with the naming server. My application is made up of two divisions: hosts a simple RCI unit, the other client who calls the RCI unit. After the compilation, I start the name server by calling po_con_naming and it comes in correctly Then I start executable with my RCI partition And here's the problem where the problem is pop up. Name on the server console, these lines appear about each other: cosnaming.namingcontext: "Aaaa polyorb.dsa_p.partitions RCI; Cosnaming.namingcontext:" Aaaa polyorb.dsa_p.partitions RCI; look for "Cosnaming.namingcontext:" Aaaa polyorb.dsa_p.partitions RCI; "look Cosnaming.namingcontext:" Aaaa polyorb.dsa_p.partitions RCI; "look Cosnaming.namingcontext:" Aaaa polyorb.dsa_p for. partitions RCI; "look for Cosnaming.namingcont...

java - Issue with <T extends Comparable<? super T>> -

I have a heap interface, and a heap class that has array-based implementation. I'm trying to pile up Class Integers, but I'm getting the following error: Exceptions in the thread "main" java.lang.ClassCastException: [Ljava.lang.Object; [Ljava.lang.Comparable] can not be cast into; In Hepare & Lt; Init & gt; (Hepyre.java) in Hepare. & Lt; Init & gt; (Heparre.Java 10) test.main (test.java)) I will announce the announcement of each category, constructor and test method, whose expectation arises in the hope, The error can explain ... Public Interface Heap Interface & lt; T comparison & lt; Super T & gt; & Gt; {...} Public Classroom Hack & lt; T comparative & lt; Is expanded? Super T & gt; & Gt; Heap interface applies & lt; T & gt; {Private T [] Heap; Personal fixed final complete DEFAULT_CAPACITY = 10; Private int number of operants; Public Hippie () {This (DEFAULT_CAPACITY); } // and the default constru...

javascript - Prevent disabling of alert boxes with jQuery -

उपयोगकर्ताओं को पसंद करने से रोकने के लिए चेतावनी ("नमस्ते"); या पुष्टि करें ("'ठीक' या 'रद्द करें'" क्लिक करें); ? समस्या यह है कि मुझे कुछ उद्देश्यों के लिए इन चेतावनी बक्से की आवश्यकता है इसलिए यदि उपयोगकर्ता उन्हें अक्षम करने के लिए इस चेतावनी बॉक्स में चेकबॉक्स को चिह्नित करता है, तो वे अब और दिखाई नहीं देंगे और आगे कदम विफल हो जाएंगे। मैं इस चेतावनी बॉक्स पर पुष्टि की गई विकल्प को चेक कर रहा हूं यदि (पुष्टि करें ('कुछ संदेश')) {चेतावनी ('पुष्टि के लिए धन्यवाद'); } और {चेतावनी ('आपने प्रेस को क्यों दबा दिया? आपको पुष्टि होनी चाहिए'); } (कोड यहां पाया गया है: इसे नियंत्रित किया जाता है ब्राउज़र, तो आप सीधे इसे अक्षम नहीं कर सकते। जहाँ तक मुझे पता है, यह केवल क्रोम की सुविधा है। आपको दो विकल्प हैं: नहीं एकाधिक अलर्ट बक्से बनाएं (जब भी "बहुत बार" होने पर चेतावनी बक्से को निष्क्रिय करने का विकल्प प्रदर्शित होता है।) एक कस्टम इशारा बॉक्स जैसे jquery UI का उपयोग करें। ()

How to write data to MySQL table field(column) in PHP -

itemprop = "text"> I have mysql table as websites with three columns, one serial number, the other is a website and the third is content . With the script below, I am able to loop through the website column and am manipulating some. Now there is output for each of my manipulation and as soon as I manipulate, I want to write it in the content column. & lt ;? Php $ mysqli = new mysqli ("localhost", "root", "", "whit"); / * Check connection * / if (mysqli_connect_errno ()) {printf ("Connect failed:% s \ n", mysqli_connect_error ()); Go out(); } $ Query = "Select Website From Websites"; If ($ result = $ mysqli- & gt; query ($ query)) {while ($ line = $ result-> fetch_assoc ()) {$ website = $ row ["website"]; $ F = file_get_contents ($ website); // How to write the contents of the content in the website line in the $ MySQL table I} / * Set the Free Result * / $ Result-> Close (); } / * Cl...

django - Error While Running python manage.py shell -

I am following the documentation of Django, and I had a problem running this command: python manage.py shell it seems to me that error: tab in the file "manage.py", line 7 django.core.management import execute_from_command_line TabError: Indenteshn and location Inconsistent use of I know what it means, but I do not know how to edit my manage.py file so that it works. Maybe I could edit the indentation by mistake and now I do not know how to return. This is what my manage.py file looks like: #! / Usr / bin / env python import os import sys if __name__ == "__main__": os.environ.setdefault ( "DJANGO_SETTINGS_MODULE", "polling.settings") from django.core.management import execute_from_command_line execute_from_command_line (sys.argv) Thanks! If you are using a mix of tabs and spaces in your manage.py Use public text such as text editors in the form of indents, which displays white space in the form of spaces / tabs so that ...

javascript - Code Not Tracking Email Enquiries In Google Analytics -

I get an email query submitted through a website to appear in Analytics as a tracked event I am trying to This customer has many domains, so we are tracking which email check came from that site. This is a code that has been created so far. (Please note that we use coolfuse to pull from our CMS system) Any support will be great.

LibGDX - Getting the position of a Image inside a table -

Image
मुझे मेरे libgdx- खेल के भीतर एक छोटी सी समस्या है: जैसा कि आप बाईं ओर देख सकते हैं (1 के साथ चिह्नित।), यह मेरे चरण के अंदर तालिका, और इस तालिका के अंदर 7 छवियाँ हैं (एक 2 के साथ चिह्नित।)। मैंने उनसे जोड़ा है: tableInventory.add (नई छवि (खिलाड़ी .getInv ()। GetSlots2 () [i] .gettexture ())। आकार (16, 16) .पैड (9.5 एफ)। कॉलस्पैन (3) .ओरो (); मेरी समस्या अब है, मैं तालिका के अंदर उन चित्रों की स्थिति प्राप्त करना चाहता हूं, इसलिए मेरे प्लेयर के अंदर टच डउन () - विधि का उपयोग करने के लिए उस (और आकार) का उपयोग कर सकते हैं देखने के लिए क्लास, यदि माउस उन चित्रों पर क्लिक करता है। मैंने टेबल की कोशिकाओं को प्राप्त करने की कोशिश की, छवियों को प्राप्त करने के लिए, लेकिन यह कहता है कि ये कोशिकाएं रिक्त हैं। तो, मैं छवियों की स्थिति कैसे प्राप्त करूं? या अगर छवि (अभिनेता?) पर क्लिक किया गया है, तो जांच करने का एक आसान तरीका क्या है? एक बहुत आसान तरीका बस छवियों को एक ClickListener संलग्न करें स्टेज इनपुट निर्देशांक को सही ढंग से बदलने और सही अभिनेता को क्लिक करन...

mysql - AWS RDS storage-full -

For some reason, the example of mysql on RSS was storing, one of the tables I used for logging Trying to minimize this tables had about 9 million data sources, unfortunately, this SQL statement "sort table A;" Already ran over 60 hours! It was still going on and the table was closed, because when I checked the count of this table it got stuck, there is no other way to leave some space for my SQL, should I complete this tuner Have to wait until? Thanks in advance. Have you tried to leave the table and recreate it? I think that should be a little smaller

html - css) margin doesn't work -

पूरे कोड: & lt; div id = "as_profile" class = "div_clearboth" & gt; & lt; / div & gt; & Lt; div id = "as_notice" वर्ग = "div_clearboth" & gt; & lt; / div & gt; HTML कोड में, #as_profile और #as_notice है दोनों में class = "div_clearboth" है विशेषता। .div_clearboth {स्पष्ट: दोनों; मार्जिन-नीचे: 10px; } सीएसएस कोड में, मैं स्पष्ट करता हूं: दोनों शैली और मार्जिन-नीचे: 10 पीएक्स शैली से div_clearboth विशेषता। यह अन्य डिवीट टैग्स में अच्छी तरह से काम करता है, लेकिन यह #as_profile में अच्छी तरह से काम नहीं करता है। jsfiddle की जांच करें तब आप देख सकते हैं कि #as_profile और #as_notice के बीच कोई स्थान नहीं है। वे 10px दूर होनी चाहिए। मैं इसे कैसे ठीक कर सकता हूं? पूरे कोड: टैग और [## कुछ ##] सर्वर द्वारा स्वचालित रूप से प्रतिस्थापित करने जा रहे हैं। आप इसे #as_profile दृश्यमान के साथ एक अतिप्रवाह मान: #profile_control {अतिप्रवाह: छिपा हुआ; } या इनलाइन ब...

c# - Create 3 dimensional grid two elements, one element in one row but in random columns -

I have created a 3-dimensional grid for filling the grid's empty space. I have two different objects. One should be in one line, but on the randomly selected column. Anyone before this or someone will tell me in the right direction? I am using Unity and C # Thank you. Vector 3 = Towerisan = new vector 3 (3, 3, 3); Create a grid tower for // (int x = 0; x is the code for the grid. I tried to place two objects in a single list on those objects, but random column objects are found in the same column when I do this with the code I i Then thought that two types of cubes were put in separate lists which became more dirty. Does that help support the code? I know this is a very old question to me. It was a project that was canceled. I randomly came on this and with curiosity I decided to try to fulfill this particular issue, I was having such a problem, then back. And I did. public vector 3 towerasis = new vector 3 (3, 3, 3); Public game object tile; Public game ...

python - Nested dictionary to multiindex dataframe where dictionary keys are column labels -

Say I have a dictionary that looks like this: dictionary = {'A'} : {'A': [1,2,3,4,5], 'B': [6,7,8,9,1]}, 'B': {'A': [2,3,4, 5,6], 'B': [7,8,9,1,2]}} And I want a data frame that looks like something : ABABAAB 0 1 6 2 7 1 2 7 3 8 2 3 8 4 9 3 4 9 5 1 4 5 1 6 2 What Is there a convenient way to do this? If I try: in [99]: Dataframe (dictionary) [99]: AB A [1, 2, 3, 4, 5] [2, 3, 4, 5] , 6] B [6, 7, 8, 9, 1] [7, 8, 9, 1, 2] I get a dataframe where each element is a list. What do I need to do is a multi index where each level is shown in the nested decree as well as the keys corresponding to each element in the list and in the list as shown above. I think I can work a lot of raw solutions but I hope that can be a bit easier. Pandu wants to value multi-value values ​​as tuples, not nested dykes. The simplest thing is to change your format to the correct format before trying to pass it in the dotframe: gt; & Gt; Cor...