According to this esdiscuss discussion, it is possible in ECMAScript 6 to define multiline strings without having to place subsequent lines of the string at the very beginning of the line. Allen Wirfs-Brock’s post contains a code example: var a = dontIndent `This is a template string. Even though each line is indented to keep the code neat and tidy, the white space used to indent is not in the resulting string`; Could someone explain how this can be achieved? How to define this dontIndent thing in order to remove the whitespace used for indentation?
I'm currently making a book with turn.js using Jquery of which is going well but I need a little bit of help. You see I'm trying to make a hard-backed journal-type book like the example shown here http://www.turnjs.com/#samples/html5/1. My question is, how can I get it so that the pages of the book are smaller than the front and back covers? Also how can I get it so that when I keep turning the pages, the number of pages visibly build up on the other side like in the example? Can someone please help edit the code of my main page below so that I can get the effect I'm after? <!doctype html> <ht
I'm trying to make a js app that reads and checks HTML/JS code inserted by the user. I'm using document.[some div].outerHTML to retrieve the full html contained in that element. But, I noticed that IE10 (and other versions of IE) modify HTML returned by .outerHTML property. In particular, it changes the order of parameters of any element. For example: Original code: <a id="test" class="myclass" name="test" href="mylink">link</a> Becames something like: HTML returned by .outerHTML <a name="test" href="mylink" id="test" class="myclass">link</a> As you see, the name and href params are reordered.
I have problem with position of div called reklama above footer. On this forum , I found a solution to my problem. I put two selectors into my div. position: relative; and top: -150px; But now the size of my footer changed by the size of the reklama's div. Thank you for help. html code: <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/main.css" rel="stylesheet" type="text/css" media="all" > <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="http
I'm using ruby and selenium to test a web page, with the two buttons below <div class="AVdis"> <span class="gwt-InlineHTML"/> <a class="AVcur" name="attendEdit"; font-size: 12px;">[edit]</a> </div> <div class="lineHeight"> <button type="button" class="pcbtn" style="display: inline-block;">yes</button> </div> I've tried to use driver.find_elements(:class, 'AVcur').click driver.find_elements(:class, 'pcbtn').click but it doesn't work, please advise. Thanks updated the full HTML code(the part code of class 'pcbtn' ONLY, it doesn't include the part with class 'AVcur'.): <body> <iframe src="javascr
How to hover over an item in the dropdown list in selenium webdriver? I knew about clicking, however I need to moverOver on each and every item and check the url is a secured one. Thanks
I've a problem with importing excel sheet data to work with Java. I've a Table that look likes the following. Image Name Order 1011V Holly ON-10121 As you can see, I've column Headings , Image Name Order I want to get the Column Name like A , B or C in Excel, given that I've provided the Column Headings ( Cell Values ) Image , Name or Order. For Example Something like :- getExcelColumnName("Image") , getExcelColumnName()
I'm new in vb and crystal report so please help me from my problem. I'm assigning values using vb codes to a formula field from my crystal report. Here is my code: Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocument report = New report_Student() report.DataDefinition.FormulaFields("student").Text = "Slone" & Chr(13) & "Thompson" frm_print.viewerReport.ReportSource = report frm_print.viewerReport.RefreshReport() frm_print.Show() i place this in button click event. Now i have an error on running this, before it loads the crystal report from viewer this error shows: The remaining
My delete function doesn't work when I try to delete node with only right child. It works when node has left child only or has both left and right. I would like to know if this is a valid approach to this problem. I know how to write this in C++ but I need it to work in C# also. //Private method, with args: root node, node to be deleted private Node DeleteN(Node root, Node deleteNode) { if (root == null) { return root; } if (deleteNode.data < root.data) { root.left = DeleteN(root.left, deleteNode); } if (deleteNode.data > root.data) { root.right = DeleteN(root.right, deleteNode); } if (deleteN
In an attempt to see what would happen in the case of a float underflow I found that I could make float numbers much smaller than FLT_MIN. I'm using xcode 5.1 on OS 10.9. The language dialect is gnu99. #include <stdio.h> #include <stdlib.h> #include <float.h> int main(int argc, const char * argv[]) { float underflow = FLT_MIN * 0.0000004; printf("Float min is %f or %e.\nUnderflow is %f or %e\nMin float exp is %d.\n", FLT_MIN, FLT_MIN, underflow, underflow, FLT_MIN_10_EXP); return 0; } Prints: Float min is 0.000000 or 1.175494e-38. Underflow is 0.000000 or 4.203895e-45 Min float exp is -37. Is
I am trying to get the stdout of 7zip when it processes files and get the percentage in nodeJs, but it doesn't behave as expected. 7zip doesn't output anything to stdout until the very end of the execution. Which is not very helpful.. especially when I have large files being compressed and no feedback is shown for a very long time. The code I am using (simplified): // 7zip test, place the 7z.exe in the same dir, if it's not on %PATH% var cp = require('child_process'); var inputFile = process.argv[2]; if(inputFile==null) return; var regProgress = /(\d{1,3})%\s*$/; //get the last percentage of t
In a Gtkmm application, one of the first line is: Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc,argv,"org.gtkmm.examples.base"); I know that org.gtkmm.examples.base is an application ID. Some questions about application IDs: What is an application ID? What is the purpose of an application ID? How do I write it?
I'm attempting to set up a project using the libGDX project generator. What I have done is this: I double-click the gdx-setup.jar. All the fields in the UI are left at their default values, except "Destination" (C:\Users\Robert\Development\libGDX\test) and "Android SDK" (C:\Users\Robert\Development\android-sdk). I select "Desktop" and "Android" for sub projects, and deselect all extensions. Finally, I click "Generate". After a while the build stops, and it informs me that "Build failed". I have also tried to run gradlew from the command line like this: gradlew.bat clean --refresh-dependencies
I am using SQL-server 2012. I have a large excel file about 200 MB in size. I normally Import data from excel file to sqlserver by using sql-server management studio (by selecting database->Tasks->Import data) then selecting microsoft excel as datasource. I have noticed several times whenever i use any excel file more than 100MB I gets this error TITLE: SQL Server Import and Export Wizard The operation could not be completed. ADDITIONAL INFORMATION: Unexpected error from external database driver (ڟ珉⒀珉Ɇ 䠠⁖). (Microsoft Office Access Database Engine) BUTTONS: OK here are technical details which
Is there a requirement that the ears must show on photos used for US visas? This is specifically about women with long hair. There are several example photos of women on official sites where the ear does not show. See for example at the bottom of this page: (There was another official site with many examples of "good" and "bad" photos. I used it as the reference when taking the photo. I can't find the page now but I clearly remember it also had "good" example photos where the ears didn't show.) However, on the final checklist auto-generated by the visa application website there is this item: I
When i tried to connect to sql server configuration manager in sql server 2008. It shows error MMC could not create the snap-in. It was working perfectly till last night. What can be the reason, how can i solve it. I can not post image of error because of low reputation.
I am using a $(window).scroll event triggered function on my website, all is well only that it doesn't work on mobile devices. This is the code I am using: $(window).scroll(function(){ var wh = $(window).height(); var scrolledFromtop = $(window).scrollTop(); if( scrolledFromtop > wh ){ $('html').addClass('scrolled'); }else{ $('html').removeClass('scrolled'); } }); I also tried this code but with no success: document.addEventListener("touchmove",aaa, false); function aaa(){ var wh = $(window).height(); var scrolledFromtop = $(window).scrollTop(); if( scrolledFromtop > (wh) ){ $('html').addClass
I am looking for a help in converting a IBM Tivoli script to Autosys since we have migrated from Tivoli to AUtosys. Below is the script in Tivoli - SCHEDULE SX On RUNCYCLE YEARLY VALIDFROM 02/01/2015 "FREQ=YEARLY;INTERVAL=1;" UNTIL 0550 +5 DAYS CARRYFORWARD ... ... I need to convert this same script so that it can work in Autosys. Not sure, what Tivoli script means and what this Tivoli is doing and how I can convert it in run_calendar in AUtosys script What about UNTIL and carryforward option ? Thanks.
I'm trying to import an Excel file (.xls) with 18 columns; the first row has column names. The file contains 3718 rows of students personal data. This is the error I receive importing the file into a SQL Server database: - Copying to [dbo].[masterlist$] (Error) Messages * Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Invalid character value for cast specification". (SQL Server Import and Export Wizard) *
I have the following piece of code to open a .tgz file, but I'm getting tarfile.ReadError: file could not be opened successfully. fp = tarfile.open('file.tgz', 'r') print fp.list() fp.close() I can extract this archive using "tar -xvzf file.tgz." Apparently it has something to do with the way the file was created because when I compare two different .tgz files using file, I see a difference; file2.tgz works with this piece of code. $ file file.tgz file.tgz: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT) $ file file2.tgz file2.tgz: gzip compressed data, was "", last modified: Tue
I am coding for a JPA project (hibernate with spring). The problem am facing is when I execute the below interestCalculation() method with @Scheduled annotation I am getting exception: org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value : com.mad.app.domain.DemandLedgerMap.demandLedger; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value : com.mad.app.domain.DemandLedgerMap.demandLedger After the for loop in quartsTestdDisplay() is completely executed. But, when I execute sa
My datatable plugin is not working and i dont know why please help... when trying to debug the javascript on Google crome i found this error and i know if they are clashing Uncaught ReferenceError: jQuery is not defined localhost:49769/Scripts/main.js:1 Uncaught Error: Graph container element not found localhost:49769/Scripts/Template/js/plugins/morris/morris.min.js:1 'Range.detach' is now a no-op, as per DOM (http://dom.spec.whatwg.org/#dom-range-detach). Am using MVC5 to develop the application this is the main Js jQuery(function ($) { $(document).ready(function () { var table = $("#customer
I am in a serious confusion since this morning after the project meeting .. I am very much new to java, I have worked as Application Supporter before, but java seriously ruffled my mind. My Question: I am developing a web based application using Servelts/MYSQL, and my boss wants me to develop another application which was already developed before and he has lost the code, I have to develop that app again, But I don't want to use servlets for my 2nd project.. I think I can do that application using Swing or GWT, or AJAX, now that problem is have to integrate my application with my first applica
I am getting LazyInitializationException while using createQuery(), load() or get() methods. Configuration is based on annotations. This is exception which I am getting: Method threw 'org.hibernate.LazyInitializationException' exception. Cannot evaluate lt.package.to.Setting_$$_jvstfff_0.toString() Schema structure: CREATE TABLE IF NOT EXISTS `Settings` ( `key` varchar(255) COLLATE utf8_lithuanian_ci NOT NULL, `value` varchar(255) COLLATE utf8_lithuanian_ci DEFAULT NULL, PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci; PersistenceConfig.java @Configuration @
Let's say there's a number of files in a given directory with various file extensions or no extensions at all. Some of these files include the string "\/for\/endetta". How do I find and remove all the files in that directory matching this pattern? I could sort of do this by using: find -type f -exec egrep -Il '\/for\/endetta' {} \;|xargs rm -fv But is it possible to do it without xargs? And how do I properly escape the \s and /s, etc.
I want to enter the sleep mode with WFI on a STM32F030 (Cortex-M0). However, my code doesn't seem to work on the STM32F030, but works on an STM32F103. I think it works, because when trying to flash the F103 again (with the ST-LINK utility or Keil), it doesn't respond, and I have to connect under reset, which tends to indicate that the CPU is sleeping. But I can connect without problem to the F030. Here is my code: int main() { SetupSleep(); __wfi(); while(1){} } Here is the content of my SetupSleep() function: void SetupSleep(void){ SCB->SCR |= (1ul << 1); SCB->SCR &= ~(1ul << 2); } Which, acc
CREATE FUNCTION insertrecord(@id int, @location varchar(20)) RETURNS INT AS BEGIN INSERT Into [dbo].[Location] (Id,Emploc)values(@id,@location) RETURN SCOPE_IDENTITY() END GO Above code gives following Error Msg 443, Level 16, State 15, Procedure insertrecord, Line 11 Invalid use of a side-effecting operator 'INSERT' within a function.
>>> class B(): ... pass ... >>> class C(object): ... pass ... >>> b = B() >>> b.__len__ = lambda: 7 >>> len(b) 7 >>> c = C() >>> c.__len__ = lambda: 5 >>> len(c) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: object of type 'C' has no len() It is mentioned in Python's documentation, but I still don't understand how it works.
>>> class C(object): ... pass ... >>> c=C() >>> c.__reduce__ <built-in method __reduce__ of C object at 0x1ae734> Does this __reduce__ do anything if I don't implement it? Normally we add methods only when necessary, e.g. add __getitem__ to implement self[key], add __sub__ to implement x-y... So I guess it must do something by default? Otherwise it should be omitted..
I have a web site which continuously reads data from another site and plots that information on a map. I have a socket started as client.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, new AsyncCallback(ReceiveCallback), state); ReceiveCallback reads the data and dumps it in a Queue for another thread to analyse and then sets the waithandle to start that thread. readBytesWaitHandle.Set(); Very rarely I am getting the following error System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millis