Posts

Showing posts from March, 2013

c# - how to set background of grid -

I have BitmapImage , and it is set as the Background I want to do this grid I have tried to do this xaml: & lt; Grid X: Name = "content page" & gt; & Lt; Grid.Background & gt; & Lt; ImageBrush X: Name = "IMGbG" /> & Lt; /Grid.Background> & Lt; / Grid & gt; C #: Bitmap image BMP = new bitmap image (); Bmp.DecodePixelWidth = (int) scrnWidth; Bmp.DecodePixelHeight = (int) ScanHigh; Bmp.SetSource (e.ChosenPhoto); ImageBrush ib = New ImageBrush () {ImageSource = bmp}; ImgBg.ImageSource = ib.ImageSource; Output: Output is just black. Question: I am unable to use the above code as grid element as background code> bitmapmigration , am I missing something? Update I knew when we set the image to background to grid So it works fine: ImageBrush ib = new ImageBrush) {ImageSource = bmp}; ContentPanel.Background = IB; But I need to use the xaml path, the question is the same. & lt...

publishing - Spotfire report appearing blank when published -

I have prepared a report in Spotfire that looks fine in software, but when accessed through our web player So it is only empty on the screen. I have created another report, which works perfectly using the same data table, and the connection strings and login details are the same. I have asked all those who use Spotfire and have seen any problem before, any suggestions on what the problem might be, and where I can try to see, will be greatly appreciated. !! Thanks to those who saw my quiz - sorry it was a bit unclear! It was found that this problem with the complexity of the report was the ability of our web player!

How to assign array value to textarea in smarty php [Solved] -

I have a form where I have to edit this information. I can edit all the fields except the description. Why does textarea not accept dynamic array values? this is my problem. Please help me fix this. thank you in advanced.. & lt; Form id = "commentForm" name = "commentForm" action = "index.php? Mdf = addbiography" method = "POST" enactepe = "multipart / form-data" & gt; {If $ admindetails [0] .name neq ''}} & lt; Input type = "hidden" id = "action" name = "action" value = "saveupdate" & gt; & Lt; Input type = "hidden" id = "upid" name = "upid" value = "{$ admindetails [0] .id}" & gt; {Else} & lt; Input type = "hidden" id = "action" name = "action" value = "add_biography" & gt; {/ If} & lt; Article class = "module width_full" & gt; & Lt; Header & gt...

mfc - How to design a dialog with 640*480 which can be used on 800*600 resolution? -

I should design a dialog with size 640 * 480, which can be used at 800 * 600 resolution. Currently my dialogue size is 411 * 292, look, it looks great, but in fact I was asked to design a dialogue with the size given above. I tried it but this dialogue is bigger than my previous dialogue, size 411 * 292 When using 800 * 600 resolution or looks big in my dialogue and is not able to see some of my controls This is the size of my dialogue, Can anyone tell me how to design dialogue with 640 * 480 (which should not be large)). And how can I make my application fit in any resolution so that all the controls are displayed on the dialog. Dialogs are enhanced in the Dialog units and dialogue unit scales on current UI settings and depend on system font Does. So if the user chooses a larger UI representation then your dialogue will also increase. The best advice I can give is: the size is controlled by all of you. Choose a font that you like, set it in Control, calculate the sta...

git - Unable to start openssh server windows 7 -

I get OpenSSH service can not be started The service did not report an error When I try and more help is available by running net start startdd . There is no OpenGL log file in Var / log for any reason. I have been opened as a command prompt administrator and I have installed the passwd file. Any idea why this is happening?

css - How to decrease the height of image logo in wordpress -

I have an image logo in my website: quantgreeks.com. I want to reduce the size of the logo length. It seems that there is a lot to take in the top place. I would like to reduce it without changing the image size. Deleting / deleting padding -bottom: 45px; Padding-top: 45px; to header # masthead hgroup should fix that problem It will be: header # masthead hgroup {status: relative; Zoom: 1; } or header # masthead hgroup {location: relative; Padding-down: 15px; Example value padding-top: 15px; Example value Zoom: 1; }

Error when creating an Eclipse product configuration: org.h2.jdbcx.JdbcDataSource cannot be found by org.eclipse.net4j.db -

I have created a CD server using a run configuration which is org.eclipse.emf.cdo.server.product.tcp_h2 Runs a product. It works perfectly fine without any error. However, I have tried to create a product configuration that is based on this current product due to: java.lang ClassNotFoundException: org.h2.jdbcx.JdbcDataSource Org.eclipse.net4j.db_4.3.0.v20140114-0640 I can not find any changes between run configuration and product configuration. Does anyone know the possible cause of this problem and why, product configuration is not working the same way as the current run configuration? As Clone had commented, the problem was due to incorrect plugins. I updated meta-inf dependencies and it worked fine.

math - How to find touch point angle in arc android -

Image
I want to create an image below using canvas Android, here I want to know that the user inside the touch point arch (I.e. wx1, wx2 .. wx7). I'm not sure about finding angles for user touch. Please provide me some suggestions. Here is the code for drawing the arc, the broom angle varies depending on the position for (int i = 0; i = 340) {canvas.drawArc (rect, i, (float) 20.2, wrong, dark gray);} Else {canvas.drawArc (Rect, i, (float) 19, wrong, light gray)}} here is the image the way. So, you will create rectangular dimensions that are related by each hand, which are related to each of your visual elements. onTouch P On Touch Listener Attach will be: @override public boolean on touch (see We, Motion Event Event) {Log D. ("Bounds", "X:" + Event .getX (+) "y:" + Event.getY ()); If (rect1.contains (int) event.getX (), (int) event.getY ()) {....} and if (rect2.contains ((int) event.getX (), (int) event. GetY ())) {....} r...

flume - Using Kafka to import data to Hadoop -

At first I was wondering if incidents should be used to obtain in Hadop, where they will be stored and From time to time analysis will be done on them (possibly using Ooozie to periodically analyze) Kafka or flu, and decided that Kafka is probably a better solution, because we have a component that processes the event So, in this way, both batch and Event processing components get data in the same but know that I'm curtly looking for suggestions on how to get data from Broker to Hadoop. I found that Flume can be used in conjunction with kafka Fluid - Includes the source (consumer) and sync (manufacturer) And it has also been found on the same page and has a name in it Camus - LinkedIn's Kaafka => HDFS pipeline This is a link for all data usage Is done, and works great. I'm interested in what would be better (and easier, better document solution) to do this? Also, are there any examples or tutorials how to do this? When I want to simplify this type o...

oracle - Sql query. Nested or not? -

I am trying to list JR + SR students by their head but it is not working .. SELECT STD_Major, Std_Class, AVG (Study_gpa) student where studs link and 'SR%' group like 'SR%' Group, Stadmager, Stady Class; Maybe use or operator and

matlab - How can I generate a set of n dimensional vectors that contains all integer points in an n-dimensional rectangular prism -

OK, so I'm working on a problem related to quantum chaos and everything I need to do is en-dimension Find all integer points for parallel pipes in the unit cube n-dimension and for this parallel interior. I am trying to do this using the following plan: Looking at the dimensions of the linear map B and cube n, we change the numbers to find the coordinates of the units of hyperbolicb. In 0 b (2 ^ N -1) in their binary representation and rotate them which describes the corner of the cube. The next step was to implement Map B for each of these vectors. A set of 2 ^ n vectors describing the coordinates of parallelpiped in N dimensions gives me Now, we take the maximum and minimum value obtained from any of these corners in each coordination direction, that is, the first element of my vector can have a maximum value of 4 in all corners and at least 3 can be valued Is there. It gives me an en-dimensional rectangular prism in which I have parallel pipes and some extra unwanted ...

iphone - How to Set a Space between Tableview Cell in iOS? -

I am a newbie in iOS development and I know that this question has been asked many times, but I am confused for it. I want to know how to set a location between the UITWView cell in the section. In my app there are two sections in the UITWV, the first section contains only one data value, so there is no problem. But in my second section there are 5 to 7 data values, but there is no space between them, which is how to set the location in the footer between the second section cell in the UITableView. OK, there are two ways for your class - (UIView *) tableView: (UITableView *) tableView viewForHeaderInSection: (NSInteger) section and - (UIView *) tableView: (UITableView *) TableView viewForFooterInSection but not intended to place space among cells in the same section. There are two options for my money ... the first and most complex / hacky The - (NSInteger) numberOfSectionsInTableView: (UITableView *) tableView you can return the number of cells in the second s...

php - using nl2br to insert a line break only once rather than before each new line -

I have a string and I am using nl2br to insert line breaks . How can I make it? Before breaking all the new lines just before breaking a new line, insert all the new lines before a line break instead to match all repeating br and a single $ pattern = "/ (\ & lt ; Br / / & gt;) as well as can use preg_replace () + / I "; $ Replacement = " $ Range = -1; $ Count = 0; $ Result = preg_replace ($ pattern, $ replacement, $ theme, $ range, $ count);

java - System.exit(0) not working & Object Oriented Design. -

मैं अतिरिक्त और गुणन करने के लिए एक सरल जावा प्रोग्राम लिख रहा हूं वस्तु उन्मुख तकनीक का उपयोग करके पहले यह आपरेशन एडीशन, गुणा या निर्गमन के बारे में पूछता है। जब जोड़ और गुणा बटन दबाया जाता है तो इसे उपयोगकर्ता से दो नंबर मिलते हैं, कार्य करता है और परिणाम देता है। लेकिन मेरा समस्या तब होती है जब बाहर निकलें बटन दबाया जाता है, इसके बजाय यह संख्याओं के लिए पूछता है। और दूसरी चीज जिसे मैं पूछना चाहता हूं वह है कि मैं वस्तु उन्मुख दृष्टिकोण का पालन कर रहा हूं। import javax.swing.JOptionPane; सार्वजनिक वर्ग कैलक्यूलेटर {निजी स्थिर इंट नंबर 1; निजी स्थिर इंट नंबर 2; सार्वजनिक स्थिर शून्य सेटनंबर 1 (इंट एन 1) {number1 = n1; } सार्वजनिक स्थिर शून्य सेट संख्या 2 (इंट न 2) {number2 = n2; } सार्वजनिक स्थिर int getNumber1 () {वापसी नंबर 1; } सार्वजनिक स्थिर int getNumber2 () {वापसी संख्या 2; } सार्वजनिक स्थिर शून्य संख्याएं () {int n = पूर्णांक.पर्सेइंन्ट (जॉप्शनपैन.शोइनपुटडियलोग ("प्रथम संख्या दर्ज करें:")); इंट एनएन = इंटीजर। पार्सआईंट (जॉप्शनपैन। शोइनपुटडियलोग (...

ios - Navigate between TabViewController and NavigationController -

Image
I have a view controller (A) embedded in a navigation controller, and from which I'm doing a model For another view controller (B), which is inside another tab view controller, my question is how can I navigate from B to A, I have created a model SEgue from B to navigation controller in which A is And I do that seguay but I'm getting ' I have no relation with the receiver 'A' identifier 'my sguyu', if I do a seagull directly from A, then I have not been shown to the navigation controller in the scene now, I think that due to this fact That has never been started. Please talk to me Can a solution for? Thanks a lot! The previous view controller that can be on the navigation stack or you do not return to that controller, Instead, create a new example of the controller which will be pushed onto the stack, to make a loop that will use a lot of memory. In this case, your stack will be the ABA controller, instead Just A , if Segu will work. Wha...

perl - Working with child nodes in subroutine (XML::LibXML) -

I parse some XML data in my small code, but since I need the same thing in 3 places , Then I would like to make a suboutine for every time but I need to pass the current node which I am working as an argument, beyond reaching the current node's hair nodes beyond its current skill. Here is an example of my code: foreach $ day ($ doc-> SearchNode ('/ my / current / path')) {@atts = $ Day-> GetAttributes (); Foreach $ at (@atts) {$ na = $ at- & gt; GetName (); $ Va = $ at- & gt; GetValue (); If ($ va eq "Today") {# ------ My double code starts here ----- foreach $ cheese ($ day- & gt; SearchNode ('child_nodes_im_looking_for')) {# - --- Do a lot of things} # ------ My double code ends -----} If ($ va eq "tomorrow") {#same repeat code} if ($ va eq "some_other_day" ) {# Once repeated code .... again) for the second day ... do not do anything How do I pass my current node into subroutine so that I can directly Can...

java - Eclipse does not launch (Ubuntu) : JVM terminated. Exit code=2 -

The "post-text" itemprop = "text"> I'm installing Ubuntu 14.04 LTS (64-bit) 64 bit then Install Eclipse Luno Standard for Install Jdk and follow all the steps to set jdk using the following link, Then I get an error after starting my eclipse after I have been able, the VM has ended code = 2 / Usr / bin / java -Dosgi.requiredJavaVersion = 1.6 - XX: MaxPermSize = 256M -Xms256m -Xmx1024m jar / home / Eheuristic / Ecclipse / Eclipse // plugins / org.eclipse.equinox.launcher_1.3.0.v20140415- 2008.jar -os Linux -ws GTK -arch x86_64 -showsplash / home /eheuristic/Ecclipse/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925- 0400 / splash.bmp -launcher / home / Eheuristic / Ecclipse / Eclipse / Eclipse -name assumed --launcher.library / home / eheuristic / Ecclipse / eclipse // plugins / org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1. 200.v20140603-1326 / eclipse_1605.so -startup /home/eheuristic/Ecclipse/eclipse//plugins/org.eclipse.equinox...

How to run python code from javascript code using xampp? -

I have a website written on html and I have a button, which should run a dragon script when clicking. The button is programmed in Javascript, and how do I connect javascript and python together on this site, but the problem is that I'm running the website using xampp and localhost, so i do not know the configuration code to run python code. I have tried using mod_wsgi, but the instructions are very confusing and I really do not know what I'm doing. I do not want to use JQuery or Ajax, I want to use it, to run Python code, regular Javascript. How will I accomplish this? Actually I just want to run the button a dragon script, which is in the same directory as the website. I do not want to run the python code directly from the local host, rather I refer to it with reference to the javascript code and to run Want to EDIT: It has been told me that JavaScript and Python are connected through a client server relationship, so my question is how xampp runs Python code through we...

f# - Number formatting in WebSharper Google Visualization -

मेरे पास WebSharper के Google विज़ुअलाइज़ेशन लाइब्रेरी से संबंधित प्रश्न है फिर भी, Legend पर प्रकार लीजेंड [& LT; इनलाइन "{}" & gt;] () = [& LT; DefaultValue & gt;] वैल परिवर्तनशील स्थिति: LegendPosition [& LT; DefaultValue & gt;] वैल परिवर्तनशील संरेखण: LegendAlignment [& LT; DefaultValue & gt;] वैल परिवर्तनशील textstyle: पाठ-शैली यह खाते में नहीं देखते है इस नाकाम करने के लिए एक तरह से ले करता है numberFormat जो GeoChart के रूप में इस तरह के चार्ट में प्रयोग किया जाता है ( प्रारूप टूलटिप्स / किंवदंतियों) करने के लिए बहुत धन्यवाद एक सामान्य वैकल्पिक हल:? जावास्क्रिप्ट अनुवाद में xy = y पाने के लिए x? Y और lt; - z गतिशील असाइनमेंट का उपयोग WebSharper कोड में किया जा सकता है। ? तो आपके मामले में, उदाहरण के लिए कथा numberFormat & lt; - आप भी इस के लिए एक सहायक विधि के साथ कथा प्रकार विस्तार कर सकते हैं "##।":। प्रकार लेजेंड के साथ [& lt; जावास्क्रिप्ट; इनलाइन & gt;] सदस्य this.WithNum...

javascript - break the line inside onClick (HTML) -

मैं कोड जोड़ने के बाद लाइन को तोड़ना चाहता हूं उदाहरण: string1 = abc string2 = 123 मैं एबीसी 123 के रूप में एन्डिंग प्राप्त कर रहा हूं। लेकिन मैं इसे इसे एबीसी 123 & lt; input name = "string1" & gt; & Lt; इनपुट नाम = "स्ट्रिंग 2" & gt; & lt; p & gt; & Lt; input name = "showMeArea" readonly = "true" & gt; & lt; br & gt; & Lt; इनपुट प्रकार = "बटन" मान = "स्ट्रिंग संयोजन" OnClick = "showMeArea.value = string1.value + '' + string2.value;" & gt; & lt; / p & gt; जावास्क्रिप्ट में एक लाइन-ब्रेक सम्मिलित करने के लिए बस सम्मिलित करें \ n showMeArea.value = string1.value + '\ n' + string2.value;

Node.js - Allocation failed - process out of memory even with use of JSONStream parser -

I'm trying to read and parse JSON files in about 12 large (from 100 MB + 500 MB) nodes I am Fatal error: CALL_AND_RETRY_LAST allocation failed - Process out of memory However, I am still getting this error. This is the first time I have ever seen this Just like trying to use a streaming file reader, so I'm not sure what the problem might be right now, I have the code: for (var i = 0; i & Lt; jsonfileArray.length; i ++) {if (jsonfileArray [i] .mail (/ \ .json $ /)) {stream stream = fs.createReadStream (dirPath + jsonFileArray [i]) pipe (JSONStream.parse ( ['Records', true, 'categories'])); Stream.on ('data', function (data) {console.log ('received:', data);}); }} Eventually I want to create a cumulative result object with all the parsed data from these files, but I have tried to parse anything else I have tried so far All files are prevented from being able to? Guide? You can try the "memory-leak" branch from the JS...

php - trying to understand expects / with with phpunit -

From : // Set expectation for update () method // only To call one more string and 'some' as your parameter, call $ Inspector- & gt; Hopefully ($ this- & gt; Once ()) - & gt; Method ('Update') - & gt; With ($ this-> equalTo ('some')); If -> From () is considered to represent norms, which can be found in the $ this-> Is equalTo required? Which other methods can be used there and why would they like to? As it seems, this method of calling a fake update method is to be summarily written in a nutshell and send it to - & gt; ('Some') will be written better as . And why -> Have to do ($ this-> one time ()) to ensure that the method is called only once? If you call fraud / method once, then how often can it be said several times? If I do stros () then it is 5x times - this is being called once -> Hopefully ($ this-> one time ()) Just seems unnecessary. You $ this-> -> in par Argument...

sql server - Is it possible to make an auto join of tables by foreign keys -

Image
What do I mean? The way I'm elegant, the SQL-engine will automatically add columns to keys and relationships to me that were already familiar with the SQL Server engine when I created those tables . I know that I can create query codes with all the tables and internal insertion for dirt with multiple codes (if it has many tables or / and queries dynamic). People who used to be accessible from before, it was found that the result of access is a "plus" sign on the grid, to expand the item and "objects" Allows to see It looks like this: (In this figure you can see that there are 3 rows on any related table under "1" number). I'm looking at the same thing on SQL I am managing I tried Google about it, but I could not find any expression for that action.

web - How to deploy in tomcat server without making it down -

I want to use my project Tomcat but I do not want to do it below. That means 0 downtime deployment. Note that once you have manually zero the number of sessions, once you unwrite the earlier versions of the web application. Another option is to use more than one Tomcat server at one time and remove the load balancing cluster one node between them, then upgrade the dry node, then enable that node and the other Repeat the process with the node. This is the basic stuff.

oauth 2.0 - How do i implement google/facebook login to my application? -

So I have an application based on ionic-framework and a server-side based sails.js. My application uses data such as username, password, user image, etc. So though I would rather have a good idea to use Google Sign Up using Oath 2.0. I do not know how to implement my application. Could you please provide me with a detailed description of some detailed examples of how Oath 2.0 is working with Pal? Have you tried to experiment? It is based on and generates a full authentication layer for your loose Js application including Oath 2.0 and OpenID. Edit More information about accessing third-party user profile details:

google spreadsheet - Service error: onEdit script -

I have an original edit script which will be automatically added to the column Runs to Sort. This script was working fine for several weeks but till last 10/31/14, I have been getting service errors. I am unable to determine the reason. Any ideas will be highly appreciated below code. / ** * Automatically 6 columns (not header row) Increasing ascending * / edit on function (event) {var sa = SpreadsheetApp.getActiveSpreadsheet (); Var sn = sa.getActiveSheet (); Var editedCell = sn.getActiveCell (); Var columnartia = 6; Var Tablerange = "A2: I 200"; // How to sort if If (editedCell.getColumn () == columnToSortBy) {var range = sn.getRange (tableRange); Range.sort ({column: columnToSortBy, ascending: true}}; }} I have tested your code and it worked fine. You can check out the Google Apps Script Dashboard , see the reference. You can use onEdit (e) , although see the code I have created. Edit the code function (e) {var sh = e.source.getActiveSheet (); Var e...

asp.net - Jquery Datatables Ajax Response -

I am trying to follow the example data for Ajax data source (objects). I am using asp.net and I have the following handler that receives my data, processes it and provides feedback. Public class user handlers: IHttpHandler {Private prong string JsHeader = @ "{{" "" "data" "{0}}}"; Public Zero Processing Request (HTTP Reference Reference) {IEnumerable & lt; SystemUser & gt; Data = system urological Load all system resources (); & Lt; SimpleUser & gt; Userlist = new list & lt; SimpleUser & gt; (); Forex currency (data in SystemUSSR) {Simple User Simple = New Simple User (); easy. Id = su.Id; easy. Full name = suNameFirst; easy. Email = "example@email.co.uk"; Userlist.Add (simple); } String json = JsonConvert.SerializeObject (userlist, formatting.indent); Context.Response.ContentType = "text / plain"; Context.Response.ContentEncoding = encoding.UTF8; Context.Response.Cache.SetNoStore (); Context.Res...

Create a file and save it to a parent directory using PHP? -

How do I create a file and save it to a root directory? That's because you can see that from my script below, the PHP "referer.log" saves the file in the same directory where it is PHP, but I want to save it to a root directory? This is my current PHP: & lt ;? Php $ fname = "referer.log"; $ File = fopen ($ fname, 'a +'); $ Url = "$ _SERVER [REQUEST_URI]"; Filitt ($ file, "referrer: $ url"); Fclose ($ file); ? & Gt; Say my current directory / forums / link / contact / I should have it / forum / link / log / Thanks everyone. You are free to use relative paths: $ Fname = "../logs/referer.log"; I recommend you to check that the directory exists and will create it if it is not: if (! Is_dir ('. ./logs')) {mkdir ('.. / logs', 0750, true); } Hope it helps.

r - How can I return column title within data.frame only if it contains a value of interest? -

itemprop = "text"> after I have a data.frame column containing many correct and false logical response, like this: & gt; [X] X1 X2 X3 X4 X5 X6 X7 X8 [1] false false false right wrong wrong false [2,] false false false false false false false true [3] false false false false false false false false [4,] false false false False false false false false [6,] false false false false [6,] false false false false false right [7,] false false false false I'm trying to drag where true is present, for example, I would like to see the X4, X6, X7, and X8 out, but all others were excluded. For reference, true indicates that the cell is answering the stimuli at that specific time point. I just need to know that the cell responds at all (i.e. TRUE is present in at least one column), when the cell is unresponsive. Thanks for any help in this topic about Try: ! colnames (m) [colSums (m) & gt; = 1] in colsums will be the sum of values, ...

c++ - Mapping a texture to vertices in OpenGL -

I'm trying to render techread mess with OpenGL. Currently, my main category includes a state: std :: vector & lt; Vec3d & gt; Corner std :: vector & lt; Faces & gt; Trap std :: vector & lt; Vec3d & gt; Color vec3d is the implementation of 3D vectors - nothing is special - and faces point to a class Indicates 3 integers having an upper index of meridian . So far, I presented my mesh with the following code (with working fine) without a texture: Glassehed model (Params.asp? GLCMOHHH: GL_FLAT); GlEnableClientState (GL_VERTEX_ARRAY); GlEnableClientState (GL_NORMAL_ARRAY); / * This is my attempt to add text * if (_colors.size ()! = 0) {* cout & lt; & Lt; "Hello" & lt; & Lt; Endl; * Glimpseal Detectives (GL_charcher 0); * GleneL ClientState (GL_TEXTURE_COORD_ARRAY); * Gltex coder pointer (3, GL_floyet, 0, and _colors [0]. X); } * / GlNormalPointer (GL_FLOAT, 0, and Normal [0]. X); GlVertexPointer (3, GL_FLOAT...

php - Why is DateTime:diff() off by one minute? -

I am using the DateTime :: diff () function, to resize it as soon as 10 minutes difference For some reason minute difference is closed by one For example if I want to get the difference between 11:20 and 11:30 then it will save 9 minutes instead of 10. In addition to this it is only true when "now and" If I am entering "11:20" in the new date time ("now", new datetime ("America / New York") $ date; Then it will show a 10 minute difference. Here is an example of the code I wrote. $ expiry_time = "11:30:00"; $ Date = new date time ("now", new datetime zone ("America / New York")); $ Time_now = $ date- & gt; Format ("H: I: S"); Copy $ time_now "& lt; br & gt;"; $ Time_remaining = $ date- & gt; Diff (new date time ($ end_time, new datetime time zone ("America / New York")); $ Min = $ time_remaining-> I; As I said in the first comment, check: $ ...

seo - HTML-tag to annotate the origin of a section? -

According to some people, when you use the same content on multiple sites, Google does not like it. There is no way to annotate / tag a block of content. Something like a feature: & lt; Div origin-content = "http: //some.url"> The purpose is to let Google go completely that we have repeated the content (i.e. not as part of the search ranking strategy) search engines then use this information Can do somehow. This can help you: You seem like a meta tag meta name = "original-source" content = "[url]" p It seems that only one whole page is for.

ruby - rails rubyzip make a copy of multiple zip files inside a new zipfile -

So basically I am creating a bunch of zip files that include PvE and PJE. Files are The following code generates a bunch of zip files which is named as orgname_org_member_orguser1.zip, containing 2 files (a pws and pwe) @ successful_ orgs .each do | Org | File = "# {RAILS_ROOT} / My data / # {org [: location]} _ # {org [: member]} _ # {org [: username}} .zip" generated_file (ups_file, organization) File_file (file, organization) zipfile = zip :: zip file.pan (file, zip :: zipfile :: create) pv_text, pws_text = MyGenerator.password pwe_file = "# {RAILS_ROOT} / tmp / # {org [: location]} _ # {Org [: member]} .pwe "pws_file =" # {RAILS_ROOT} / tmp / # {org [: location}} _ # {org [: member]} .pws "file.open (pwe_file, 'w ') {| File | File.write (pwe_text)} File.open (pws_file, 'w') {| File | File.write (pws_text)} zipfile.add ("# {org [: location]} _ # {org [: member]} .pwe", pwe_file) zipfile.add ("# {org [: location]} ...

sql server - Fixed width import with field-widths depending on first char of line -

I need to import a file of this type of format: PPT line In some there is a fixed width of the parents with the CCHID line, the field is different width compared to the parent width, the static width consistent with the hair earrings, but parents do not have the parent of PACCend There are more fields nearby, like other parents like CThird Child Again the fixed width is related to this time 2 parent. The preceding p-line the width with which the columns are fixed depends on the letter P vs C. C. I did not come through this file format, but I need to deal with that sucker ... I am currently reading it as (simplified): create table #fixed ( Line varchar (max)) table #link (id int identity, parent int, lintype character, line correspondence (maximum)) with bulk author #fixed '\\ unc \ path \ to \ file.txt' (fieldfremater = '' ) Insert the #link (linetype, line) into the substring (line, 1, 1), set #fixed update c from c.parent = p.id #link c cross (select the ...

erb - How to test templates with hiera data locally? -

I'm trying to get an erb template file and remove a way to use Hierra data (even here That also use a yaml file)) and just templates to create a file with the replaced values. Have you ever tried to do something like this? My first thought is to write a ruby ​​script, but maybe this is a simple solution. Thanks in advance. Edit: Since it can not be clear, I use the interpretation of the case. I want all the application configurations to be templates and committed by developers and I want to give them an automatic way to fill those templates on those local machines (laptops) without using puppet. Additional benefits are actually the validity of the templates before submitting them. I'm not sure why you want it to be done directly with Hierra data, but this is ERB And implementing with yaml ruby ​​libs will be easy. Something like this (SUUO-code): Class Arbiter requires' Erb '' yaml attr_accessor: output_path ,: yaml_path def initialize (template,...

java - Is it possible to create a grid reference system for strings to be referenced by variables? -

Essentially, what I'm trying to do creates a system that takes two inputs References a line and a grid, returning the value for that point I am a very new Java programmer, which has been transferred from Raptor to Java. I know that if I am doing what I am doing with the long term of the statement, then I want to avoid it. Essentially one input refers to one of the three columns, and another input refers to one of the three rows, and the output that is the point between them I am sorry for the lack of any coding, But I do not know how I will start it. You can use a 2 dimensional array, or hashps. Questions to ask yourself: How much value? What is Operation Priority? If the price set is small and the time limit on entry is minor, you can use it without any concerns. The hash map memory footprint may be overwhelming, but you can use more complex (arbitrary) keys.

hadoop - drill not showing hive or hbase tables -

I have created both an hbase and hive table to store some data logging information. Hbase and hive can query hbase: scan MVLogger; // comes back with 9k plus record hive: * Choose from MVLogger; // comes back with 9k plus records My Hbbes table definition 'MVLogger', {NAME = & gt; 'DbLogData', DATA_BLOCK_ENCODING = & gt; 'No', Bloomfilter = & gt; 'ROW', REPLICATION_SCOPE = & gt; '0', version correct = & gt; '1', compression = & gt; 'No', MIN_VERSIONS = & gt; '0', TTL = & gt; '2147483647', KEEP_DELETED_CELLS = & gt; 'False', BlocksAg = & gt; '65 536 ', IN_MEMORY = & gt; 'False', Blockcat = & gt; The definition of my hive (external) table is: create an external tab 'MVLogger` (`rowid` int,` id` int, `tablename` string,` created date' string, ` RADDATA string, 'client db' string) ROE format sort 'org.apache.hadoop...

Stripe - Apply coupon to customer or subscription? -

In the Strip API documentation, they show that you can apply coupons to the customer. CUST = Strip :: Client.Phil ("cus_asdasdad") cust.coupon = "CUPPONCODE" cust.save However, You can also apply a coupon: cust = stripe :: client.exclude ("cus_asdasdad") sub = cust.subscriptions.retrieve ("sub_blablabla") sub.coupon = "couponcode" Sub.save What is the difference between the two? Basically, I would like to pay $ 15 for my customer's next subscription fee, and only the next one. To create a coupon, set one time to max_redemptions property can do. The difference in your question is that the coupon was sent to Customer Invoice for Customer This means that if the invoice contains membership and many invoice items , then the discount will apply to the sum of all those. On the contrary, applying a coupon of a membership means that the discount will only apply to the cost of membership within the inv...

autolayout - Why can't add constraints for the UIView created in storyboard? -

I try to add obstacles to UIview which is the IBOutlet property, but it does not seem and I also translatesAutoresizingMaskIntoConstraints Set to number - (zero) viewDidoadload {[Super Viewedloadload]; // Set any additional setup after loading the scene, usually from a nib \ [_view1 setTranslatesAutoresizingMaskIntoConstraints: No]; NSDictionary * Visual = NSDictionaryOfVariableBindings (_view1); [Self.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @ "V: [_view1 (40)] -30- |" Options: 0 metric: zero views: view]]; [Self.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @ "H: | -10 - [_view1 (30)]" option: 0 metric: view: views]]; } Should I do anything to fix this? You need to remove visual barriers, before other obstacles, if this view is in the storyboard The hindrance is ...

java - When I run the command "mvn appengine:devserver" build failure in google Appengine? -

I am trying to go through the simple tutorial of Google App Engine with Java: but when I go to MVN Appenzin Trying to run: Devserver command, I get this strange missing directory error: [INFO] Scanning for projects ... [INFO] --------- ------- ------------------------------------------- ------- ------ [INFO] Reactor Build Order: [INFO] [INFO] Guest Book [INFO] Guestbook-War [INFO] Guestbook-ears [INFO] [INFO] Bill Using fear org.apache.maven.lifecycle.internal .builder.singlethreaded.SingleThreadedBuilder with a thread count of [INFO] [INFO] ------------------ -------------- ------------------------------------ ---- [INFO] Building Guestbook 1.0-SANPSHOT [INFO] ----------------------------------- -------------- ----------------------- [INFO] [INFO] & gt; & Gt; & Gt; Epgenine-Maven-Plugin: 1.9.0: Deverser (default-CLI) @ guestbook & gt; & Gt; & Gt; [INFO] [INFO] & lt; & Lt; & Lt; Epenzene-Maven-Plugin: 1.9.0: Deverser (default-CLI) @ Guestbook ...

c# - How can I work around a bad API function that leaves a locked file on failure? -

Basically, I am running "working" around an API, which I have no control on which a file is locked. Should not be. The method of the API looks like this: public static bulk upload (string filename) {...} // I have no capability to look inside it This behaves as if it is reading directly from the disc, and does not keep the file in memory before hand This is a problem because It has been badly written that it fails to issue file lock whenever it fails to upload is. This means that I have to start my application again to release the file - which is a big pain in production! I could only think of the work-making a personal copy of the file (for each firmware upload example ~ at least MB) it can work, but then I can use every file Manually passes the problem of later deletion (because the file lock will be open until the app is not, I can not do it in the code) Is there an alternative solution that I can do? Can not be the issue of a ton Can not My only idea is to c...

PHP check if date is between first and last day of current month -

The The first and last day of what has been investigating $ $ datetest array to determine the set dates for the current month Are in between. Output is incorrect Date, '11 -08-2014 ', '11-8-2014', is correct and inaccurate in the output. // Get the first day of the month / get the last day of month $ first_day_of_month = date ('m-01-y'); $ Last_day_of_month = date ('m-t-y'); Echo "First Day of the Month:"; Echo $ first_day_of_month; Echo " "; Echo "Last day of the month:"; Echo $ last_day_of_month; $ Datetest = array ('11 -30-2014 ', '11 -31-2014', '11 -08-2014 ', '11 -8-2014, -9-2014 '11, '11 -11- 2014 ', '11 -24-2014', '11-1-2014 ', '10 -30-2014', '12 -1-2014 ', '11-1-1997'); Echo " "; } Else {resonant "$ datetest:"; Echo "not in the month!"; Echo " "; }} Output: First day of month: 11...

Ruby: Reusing code in instance and class methods -

Text after " I am working on a project using rail and calling a fixed piece of code in both class and example ways There is a need for I am now in the following class in two class / example ways with redundant code: there is a better way to write it - module OrderHelper #to keep it simple min_days_to_ship ActiveSupport :: anxiety DEF , But other code / logic 3 end module classmethods def #to self.min_days_to_ship keep it simple, but other code / logic 3 and end and class order & lt; ActiveRecord :: Base included OrderHelper self.earliest_available Date.today + OrderHelper :: ClassMethods.min_days_to_ship end delivery_after_date self.ordered_date + min_days_to_ship end end Thank you! itemprop = "text"> examples and class methods are min_days_to_ship are similar, just after orderHelper module module and on expanded orderhelter See Code> min_days_to_ship want to be both an example and class method whenever the module is included...

java - Is there any JavaEE architecture where business logic layer is dedicated? -

इस तरह से एक शास्त्रीय 3-स्तरीय जावा आइके आर्किटेक्चर का मानना ​​ JSF / JSP / Servlets ( ईजीबी (बिज़) डीबी (दृढ़ता) सभी उदाहरण वेब और बिज़ परतों को विभिन्न कंटेनरों में दिखाते हैं, लेकिन एक ही जावा एसईई सर्वर। क्या कोई ऐसी स्थिति है जहां ईजेबी को अपनी मशीन में अलग रखने के लिए एक फायदा है? इस मामले में, मानते हुए कि वे आरएमआई के माध्यम से वेब स्तरीय के साथ संवाद करने जा रहे हैं, क्या कोई ऐसा जावा ऐ कंटेनर है जो ईजेबी प्रबंधित करता है, लेकिन जेएसपी और सर्वलेट नहीं करता? क्या कोई ऐसी स्थिति है जहां ईजेबी को अपनी मशीन में अलग रखने के लिए कोई फायदा है? कभी-कभी, विशिष्ट गैर-कार्यात्मक आवश्यकताएं आपके ऐप डिज़ाइन को निर्धारित कर सकती हैं। उदाहरण के लिए, सुरक्षा: कुछ सुरक्षा मानदंडों को हासिल करने के लिए, व्यापार परत को एक अधिक सुरक्षित सर्वर में रहना होगा जो सीधे इंटरनेट पर सामने नहीं आ रहा है। उपलब्धता: यदि आपका व्यवसाय स्तर अलग-अलग से भरी कुछ सेवाओं का खुलासा करता है वेब सर्वर की तुलना में क्लाइंट, और ये सेवाएं किसी प्रकार की मिशन-महत्वपूर्ण कार्यक्षमता प्रदान करती...

java - Why is onCheckedChanged not responding? -

I have so far following code which allow you to set a price for me to click the toggle button For some reason classified in a radiogram, it seems like on chicade is not called converting. Is it an Apocache for this? // onClickListener method which is an interface personal view. Click to create onClickClickClicklist (last integer value) {New view. Click on Click () {@Override Public Zero (see View) {buttonValue = value; Buttonstate = true; Toggle Clicked Button = (Toggleton) View; RadioGroup radio group = (radio group) clicked button .get Paint (); Last text view number = (text view) view.findViewById (R.id.num); radioGroup.setOnCheckedChangeListener (New RadioGroup.OnCheckedChangeListener () {@Override public void onCheckedChanged (RadioGroup group, checkedId int) {switch (checkedId) {case R.id.number_zero: buttonValue = value; num.setText (buttonValue); System.out .println ( "button" value + button value) case R.id.number_one: buttonValue = value; num.setText (buttonV...

tfs2012 - TFS Administrators getting TFS alerts for everything? -

We have 3 TFS administrators in our TFS 2012 environment. It seems that every administrator gets TFS alerts for everything. Is TFS Administrator wanting to get all alerts by default? Example 1 - Team Alert Setup is for Team Projects within our TFS. Alerts are configured to alert a person when he is assigned a task item. It is working as expected, however, all 3 TFS administrators are also receiving those alerts. Even if they are not in the field entrusted. Example 2 - We have a TFS project where we do not have any team alert setup. All 3 TFS administrators are receiving all alerts. If anything changes with any item of a work, a test is created, when the test cases are connected to the other, the administrators receive alerts. Has anyone experienced or heard about this? I have seen everywhere but nothing has been found. Thanks in advance for any help! You have a warning that is removed from the team project filter. As a result, there is a warning which is present in a team proj...

sql - How to convert this query to linq -

Hello Please tell me how I can convert this query to linq, in fact I need to create a dynamic pivot table from the SQL server. I have done this query but I see this query in my SQL server or the function Or can not save as well. So I want to use linq veerion of this query in my unit mode. tnx Announcement @ columns table table ([columnname] VARCHAR (50)); Insert in the @ columns ([columnname]) Select '' ['+ Convert (Nerve (50), Unit) +'] Metwaleview; Announcement @PivotColumns VARCHAR (MAX), @TotalColumn VARCHAR (Max), @SQL varchar (max); SET @PivotColumns = (XML path ('') for @ columns from SELECT STUFF (SELECT DISTINCT ',' + CONVERT (nvarchar (50), [ColumnName]) column), 1, 2, ''); SET @ TotalColumn = (SELECT STIFF ('SELECT DISTINCT' + ISNULL ('+ CONVERT (nvarchar (50), [ColumnName] +', 0) From 'column to column' XML path ('')), 1, 3, T 'pwat (max ([value]);); SET = sql =' select *, ('+ + total c...

c# - Pause loop until WebBrowser navigates and loads the document -

I have a web page that takes me to a page containing student information on the search by student ID. I have a list of student IDs. I should retrieve the student's information from the second page and store it in a figure. Here is the code string id {get; Set;} int lCount; & Lt; String & gt; ID = new list & lt; String & gt; {"A1201", "A1202", "A1203"}; Numeric result = new data (); Private void button1_Click (for object sender, EventArgs e) {for (I int = 0; I & lt; totalids; i ++) {lCount = I; Webbrowser1.Navigate ("http://www.sksit.com"); webbrowser1.DocumentCompleted + = new WebBrowserDocumentCompletedEventHandler (browser_DocumentCompleted)}} private void browser_DocumentCompleted (object sender, WebBrowserDocumentCompletedEventArgs e) {if (e.URL.toString () == "http://www.sksit.com") {HtmlElement L = Webbrowser1.Document.GetElementById ("sid"); El.SetAttribute ("value", id [lCount]...

python - Create New Timezone in pytz -

I am trying to create a timezone object for "GMT + 01", however, I can not find it One way to do this is using Patjas I tried to use the cities which () say that are currently in the field but they give strange and irrelevant results to all (they are relative to LMT) ) & gt; & Gt; & Gt; Timezone ('Africa / Algiers') & lt; DstTzInfo 'Africa / Algiers' PMT +0: 09: 00 STD & gt; & Gt; & Gt; & Gt; Timezone ('Africa / Brazzaville') & lt; DstTzInfo 'Africa / Brazzill' LMT + 1: 01: 00 STD & gt; & Gt; & Gt; & Gt; Timezone ('Africa / Conakry') & lt; DstTzInfo 'Africa / Conakry' LMT-1 Day, 23:05:00 STD & gt; & Gt; & Gt; & Gt; Timezone ('Africa / Dola') & lt; DstTzInfo 'Africa / Doula' LMT + 0: 39: 00 STD & gt; Do anyone know how to create a custom timezone with "GMT + 01" or even a relative for the time zone ("GMT"). I...

c++ - Universal reference for a concrete type -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मुझे एक फ़ंक्शन है एक ठोस प्रकार के साथ एक सार्वभौमिक संदर्भ तर्क मैं चाहता हूं कि यह सार्वभौमिक संदर्भ होना चाहिए, जब मैं उसमें संग्रहीत मूल्य की जांच करने में दिलचस्पी नहीं रखता हूं, तो मैं एक अस्थायी ऑब्जेक्ट पास कर सकता हूं। उदाहरण यहाँ है: bool bCompareData (स्थिरांक uint8_t * ARG_0, स्थिरांक uint8_t * arg_1, size_t & amp; szComparedData) {size_t & amp; i = szComparedData; के लिए (; arg_1 [i]; ++ i) यदि (arg_1 [i]! = Arg_0 [i]) गलत वापसी; वापस सच; } और संभव फ़ंक्शन को कॉल: bCompareData (Obj.uIdObject.data (), Ref.uIdTargetObject.data (), size_t ()) // यहाँ हम एक अस्थायी (rvalue) पारित कर रहे हैं / * ________________________ * / size_t लावल; bCompareData (Obj.uIdObject.data (), Ref.uIdTargetObject.data (), lval) // (lvalue) यहाँ हम एक नामित चर गुजर रहे हैं में ऊपर समारोह घोषणाओं का उपयोग करना पहले फ़ंक्शन कॉल संकलक एक त्रुटि देगा, यदि मैं "आकार_टी और एसज़ कॉम्पेरडेटडेटा" को रैवल्यू संदर्भ "...

r - Creating a 3x3 grid with constraints -

The purpose is to automatically solve the 3x3 grid problem below. With a 3x3 grid elements: letters abcdefghi I can only have integers 1 to 9 and each integer Is used only once in the grid (for example A = 1, B = 2, C = 3, ..., H = 8 and I = 9. Additionally, there are 4 small 2x2 grids in the grid : The sum of all the elements of the 2x2 grid is equal to a few numbers (in this example it is a + b + d + e = 20, b + c + e + f = 17, d + e + g + H = 27 and E + F + H + I = 15). I To solve this problem, I am trying to correct some code so that the linear programming tool. In my thinking process, it was to create such obstacles, such as only integer (9 constraints) ), Every integer can be used only once (9 constraints) and 4 2x2 grid barriers, a little bit of deliberations, I may have gone completely down the wrong path, if someone drove me in the right direction Received and can point to, then I will be most grateful.

ios - Programmatically change the image of a button in a table cell -

// objectsAry है NSManagedObjects // मुख्य दृश्य नियंत्रक वर nowImg = UIImage ( नामांकित: "img30.png") फ़ंक तालिका दृश्य (तालिका दृश्य: UITableView, सेलफोररौअटइंडएपपाठ सूचकांक: NSIndexPath) - & gt; UITableViewCell {var NuTblCellInst = NuTableViewCell () var मुख्यसेल: UITableViewCell = self.mainList.dequeueReusableCellWithIdentifier ("मुख्यसेल") के रूप में NuTableViewCell maincell.textLabel.text = self.objectsAry [indexPath.row] .valueForKey ("itemname") के रूप में? स्ट्रिंग //NuTblCellInst.doImgLoad(nowImg) // टिप्पणी हटाएं ऊपर = गंभीर त्रुटि लाइन: अप्रत्याशित रूप से पाया नहीं के बराबर है जबकि एक वैकल्पिक मूल्य unwrapping // यह अगर मैं विधि का उपयोग कोई फर्क नहीं पड़ता या सीधे NuTblCellInst.btnWImg.setBackgroungImage का उपयोग करें (unwrapping त्रुटि या तो किसी भी तरह से) वापसी मुख्यसेल} // कस्टम टेबलव्यू सेल कक्षा वर्ग NuTableViewCell: UITableViewCell {@Iboutlet कमजोर var btnWImg: UIButton! Var nowImg = UIImage (नामित: "img30.png") fun...

c# - The field does not exist in the current context in code behind -

कृपया समस्या के साथ सहायता करें। मेरे पास asp.net आवेदन है * .aspx फ़ाइल पर & lt; asp: textbox id = "txtemail" runat = "server" & gt; & lt; / asp: textbox & gt; कोड के पीछे है cmd = new SqlCommand (" Tbl_newemp मानों में डालें ('"टेस्टमेल। टेक्स्ट"') ", कॉन); जब मैं अपने समाधान को संकलित करने की कोशिश करता हूं तो मुझे त्रुटि मिलती है वर्तमान संदर्भ में नाम 'txtemail' मौजूद नहीं है आप समाधान एक्सप्लोरर में पृष्ठ पर राइट-क्लिक कर सकते हैं, और एक विकल्प है, "वेब अनुप्रयोग में कन्वर्ट" जैसे कुछ, जो आपके डिजाइनर को पुनर्जन्म करेगा फ़ाइल।

matlab - Custom toolbar disappears with call to imshow -

To create a simple GUI script in Matlab to show a series of images, with a toolbar to provide basic functionality Trying for the current image but I have seen that the toolbar disappears in a custom window window to call "Improve" to call. How can any idea change behavior so that the toolbars remain? Or does the "imshov" call have no effect? The relevant code is: % create a viewer window win_viewer = figure number, 'sample', ... ' 'No', 'resize', 'off', 'color', 'no' ... [0 0 0]); Gui_toolbar = uitoolbar ('parent', win-viewer); % Add button icon = load ('icons.mat'); Gui_save = uipushtool ('parent', gui_toolbar, 'cdata', icons.disk {1}, ... 'clicked callback', {@cb_saveImage}, 'tooltipstring', ... 'save movie'); Make% axes win_axes = axes ('parent', win_viewer); Closed axis; It is sometimes called% (IM, 'parent', Y-file, 'border...