Wednesday, 15 April 2015

hadoop - Making Hive substitution variables avialable for all the sessions.? -


If I have a replacement variable available for all hive sessions in the environment / database, that will be the best file set in it Do you? Is there any possibility to define my own config file and define variables and it is available for all queries?

Do I do it on the hive site? Can I do without using xml and hive-default.xm?

Regards, Nish

attempting to set its variable in .hverc file Please.

You can add a configuration or .hverc file and any custom variable in the hive will load this file on the launch of the shell.

For example: ' Set tablename = test ;' In the .hverc file you can select it from '$ {hiveconf: tableName}' in the hive shell, select '


batch file - Problems with Ampersand start as “Run as administrator” -


I wonder how can I create a .bat or .cmd file within a admin folder Run? Where is the same enders in the name "& amp;"? Every time I try to run the file, an error appears ... What did I do if I tried to run as an administrator CMD & amp; The name of the folder is an order.

Let me know, I have a folder named Project CMD & amp; Vbs and Project 01.bat called a file as long as I do not try to run it as an administrator until an error occurs does not come unless I folder Remove "& amp; strong> if CMD & VBS .

  folder name: CMD & VBS script name : project alternative form: context menu 01.bat execution run as the "Run" window version: 7  

Udahr Script:

  @ echo of Timt Remover - [WMP] Online music color 4f Reg Delete "HKEY_CLASSES_ROOT \ SystemFileAssociations \ Directory.Audio \ shellex \ ContextMenuHandlers \ WMPShopMusic" / f & gt; Nul 2 & gt; and 1 echo deleted messageBox "!", Vbinformation & gt;% temp% \ Msg.vbs Start / wait% temp% \ Msg.vbs & gt; tap 2 & gt; and 1 del% temp% \ Msg.vbs & gt; tap 2 & gt; and to work with the 1st exit  
& amp; character, you must save it ^ An example might help:

C: \ Temp> C Mr. can not take my test systems specified path 'Test' is went not recognized as an internal or external command, operative program or batch file.

C: \ Temp> cd my ^ & amp; Test

C: \ Temp \ my & amp; Test>


facebook graph api - Public feed from non-friend - changes/bugs? -


I was able to retrieve the public feed for non-friends. It seems that now I always get an empty list.

Process:

  • I use / feed with my access token
  • No matter what version

Any changes in privacy settings etc. are known, which can be the reason for this?

You should never be able to access non-friends' public feeds. Even access to your feed is restricted, because read_stream will not be approved by Facebook.

Just because some "public" does not mean that you can catch it on Facebook API.


excel - reference is not valid VBA hyperlink creation -


I am trying to create a hyperlink that references the previously used variable. The link is linked to a job number, which the user can click to verify the job information before printing a worksheet. I am using variables and I am unsure if this problem is causing or if the whole thing is unfathomable

This is my first time that some attempts should be made with these lines, so the prospects are endless Maybe.

Here's a piece of code, in which I'm having trouble. The error I receive is "invalid process call or logic"

  with POSheet .hyperlinks.Add anchor: = range ("J11"), _ address:. = "", _ SubAddress: = shtJob.Name, _ Screen Tip: = "Job Sheet", _TextToDisplay: = "Job Information"  
More code if necessary

I post Finish with can

Try below You need to set the subaddress property for the hyperlink to the current workbook. Note that the string "Sheet1 A1!" If you want a hyperlink to go to sheet 1 cell A1, then

  should look like with the POSheet .Hyperlinks.Add anchor:. =. Range ("J11"), _ Address: = "", _ Subeder: = Shtozob. Name & amp; "! A1", _ Screen Tip: = "Job Sheet", _ TextToDisplay: = "Job Info"  

c# - Stopwatch and DateTime.UtcNow producing unexpectedly large timing variations -


We have application logs that have record performance information for various expensive actions, we have stopwatch And DateTime.UtcNow , and we are aware that these values ​​may be different than expected, even the date time is also given. ~ 20 ms precision of UtkNo My question is What can be the reason for this and can it be decided?

The recorded information is:

  • Start time ( dateTime.UtcNow )
  • Duration ( TimSpainFormsCondus (later) / (Double stopwatch frequency) , where after and first have stopwatch values . At the beginning and end of operation
  • End time ( DateTime.UtcNow )

If you are close to starttime + duration of end time But in some cases this path is closed . We have sampled 10000 such measurements, where looking for cases is end-time and (starttime + duration) differences are more than 20 milliseconds. We found the following:

  • ~ 2% entries are closed> 20ms
  • Of these, 100ms average of this (maximum 1.4seconds)
  • Of these, the stopwatch-count expiration time in some cases is higher than the time-based expiration time, but in most cases, Windows Server 2012 R2 Hyper-V VM runs at the top of the Stopwave Windows Server 2012 R2 is
  • Machine information

    • 32 GB RAM for VM, 8 virtual CPUs
    • < / Ul>

This is expected to be Uses stopPouchformsCounter (QPC) under the Stopwatch hood, while DateTime.UtcNow uses the computer's real-time clock (RTC) is.

  • QPC comes from your CPU's timestamp counter (TSC), and it is very accurate , but accuracy in relation to UTC There is no basis for this.
  • RTC is on the computer's motherboard, and is usually made with cheap crystal oscillators, it is accurate , but is not exact .

To measure the time elapsed, you want to be precise, and thus stopwatch .

For the current time of day, you want accuracy, and thus DateTime.UtcNow .

Should use a lot of support details.

The difference you have measured is due to the clock drift in RTC. Your RTC (All Self) will fall a few milliseconds forward or behind real time. It is quite normal, and is used by NTP synchronization from time to time. For minor adjustments, the OS will spread a few milliseconds at one time, improving small intervals during intervals.

As far as an alternative is solved, you might consider a class like this:

  Public Static Class Accurate Clock {Private Stable Readonly Datetime Start Date = DateTime .Utc now; Private stationary readwatch stopwatch stopwatch = stopwatch Startup (); Public static date time GetCurrentUtcTime () {start starttime + stopwatch Apple; }}  

However, the downside is that you are making assumptions that the RTC is in perfect sync when the class is started. In fact, you are not sure about it.

If you want to guarantee the some level, then you can consider making the NTP call own I have applied a class that is actually Does in It implements the interface from iSCLock It periodically calls an NTP server, and tracks the time between the call using the stopwatch . You will use it like this:

  // Clock clocking example var watch = NetworkClock.Instance grab; // Alternatively set up NTP server during your app's startup clock. Npserver = "pool.ntp.org"; // or whatever server you want to sync // whenever you want the Datetime UTCNO = clock, get current UTC time. Now. ToDateTimeUtc (); In addition, there is something like "Multimedia Timer" or "High Precision Event Timer" (HPET) which is available on most modern hardware. It provides  more accurate  than the QPC, however, there is no direct category that displays in the .NET framework. If you search, you will find some implementations that wrap the Win32 function that provides it. Generally, this is redundant until you are talking things like graphics or audio from real time. 


How to upload products from one Prestashop store to another Prestashop store? -


We have two prestashop domains, for example abc.com and xyz.com with different databases. We want to upload products from one Prestashop store to another Spring Shop store. As we know all product images will be stored in Prestashop's IMG folder. Now we want to use these images from Store 1 and upload 2 IMG folders to store and want to synchronize only product related data from Database 1 to Database 2.

Please provide your valuable suggestions.

The same task of copying data from a database to managing products on two similar sites My sites are completely identical.

  1. The same option has a multi-touch facility in comparison with two sites with the same product, features and images in the same back office. It is very convenient for more than one shop management.

  2. The second option is that you do not want multipop options instead of exporting ps_product_shop, ps_image, ps_product, ps_product_lang tables and if the products already exist, then the use of the product 'new location' Compared to or not present in the new location. If the products already exist.

Depending on your needs,

make sure that you do 'REPLACE' rather than 'INSERT INTO', if you are not sure whether the product is being repeated or not.

Do something like

  type the lock tab `ps_product_shop`; / *! 40000 optional table `ps_product_shop` disabled keys * /; Change to `ps_product_shop` values ​​(1000010,1,1112, ------------------- .................. .................................................. .................................................. .................................................. ................................................ .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ..................................... from my other site New p folder. (Or p_old the name of the old p folder and open the new p folder there.) This works fine for me, I hope this will help you. 


javascript - accessing different elements of an HTML tag -


& lt; a href = "#" id = "

मेरे पास एक बटन है: फॉर्म-जमा करें "वर्ग =" बीटीएन बीटीएन-प्राथमिक बीटीएन-एलजी लाडा-बटन "डेटा-शैली =" अनुबंध "डेटा-आकार =" एल "& gt; & Lt; span class = "ladda-label" & gt; TESTLABEL & lt; / span & gt; & Lt; / a & gt;

और मैं इसके अंदर पाठ को एक्सेस करने का प्रयास कर रहा हूं: IF statement के माध्यम से TESTLABEL मैं इस तरह से पाठ बदल सकता हूँ:

  $ ('# form-submit')। पाठ ('जीओ')। बटन ("ताज़ा करें");  

लेकिन यह अगर / else बयान हर बार कोड का पहला समूह चलाता है - कभी भी else अगर भाग नहीं होता है।

  console लॉग (। $ ( '# रूप से जमा कर सकते') पाठ ()); यदि ($ ('$ form-submit')। पाठ ('TESTLABEL')) {$ ('# form-submit')। पाठ ('जीओ')। बटन ("ताज़ा करें"); } और अगर ($ ('$ form-submit')। पाठ ('गो')) {// अन्य कोड करना है ...}  

जब मैं बटन क्लिक करता हूं - पाठ TESTLABEL है, और जब मैं क्लिक करता हूं तो GO में बदल जाता है जब मैं फिर से क्लिक करता हूं, console.log मुझे बताता है कि यह बटन पाठ गया है, लेकिन पहले अगर बयान अभी भी चलता है जैसे कि इसके टेक्स्ट TESTLABEL थे। क्या मैं गलत कर रहा हूं?

सबसे पहले पाठ span तत्व के अंदर है # फ़ॉर्म-जमा तत्व के भीतर, इसलिए आपको $ ('# form-submit span') या $ ('# form-submit.ladda- लेबल ') इसे चुनने के लिए।

दूसरे, यदि आपके बयान में आप text () विधि का सेटर संस्करण का उपयोग कर रहे हैं यह हमेशा को सच के समान समझाता है क्योंकि विधि एक jQuery ऑब्जेक्ट देता है। इसके बजाय, प्राप्तकर्ता का उपयोग करें। इसे आज़माएं:

  var $ बटन = $ ('# form-submit') var $ label = $ button.find ('span'); यदि ($ label.text () == 'TESTLABEL') {$ label.text ('GO'); $ Button.button ( "ताज़ा"); } और अगर ($ label.text () == 'जीओ') {// अन्य कोड करते हैं ...}