I'm currently working on a project on java Swing. I need to make my custom scrollbar. I couldn't find a good tutorial on how to make one. Can anyone help me? Anything will be much apreciated. Cheers :) José. PD: I want the scrollbar to have this looks:
I am having an issue using the RegularExpressionValidator using Visual Studio 2010. This is my code: <asp:Label ID="phone" runat="server" Text="Phone Number"></asp:Label><asp:TextBox ID="phonebox" runat="server" TextMode="Phone"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Invalid Number" ControlToValidate="phonebox" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}"></asp:RegularExpressionValidator> <br /> No matter what number I type in, I get an error message beside the field - even if I copy and paste a valid US phone
I have a new and intriguing requirement. Instead of the placeholder disappearing when the user starts typing, it should remain visible and shift over to the right hand side of the input box. Is this even possible with a standard HTML placeholder? How might I achieve this? Thanks
I am using the following code to unzip a set of files (containing folders as well): private boolean unpackZip(String path, String zipname) { InputStream is; ZipInputStream zis; try { String filename; is = new FileInputStream(path + zipname); zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry ze; byte[] buffer = new byte[1024]; int count; while ((ze = zis.getNextEntry()) != null) { // zapis do souboru filename = ze.getName(); // Need to create directories if not exists, or // it will generate an Exception... if (ze.isDirectory()) { File fmd = new File(path + filename); fmd.mkdirs()
I tried running the program code soundclouddroid https://code.google.com/p/soundclouddroid/source/browse/ 1.2.2. I had another problem before I settled on Stackoverflow but now I have one and cannot understand why it happens. My problem is: java.lang.RuntimeException: Unable to start activity ComponentInfo {es.manu.sd122.soundCloudDroid/es.manu.sd122.soundCloudDroid.CustomTrackListsActivity}: java.lang.IllegalArgumentException: Unknown URI content :/ / is .manu.sd122.provider.soundCloudDroid/tracklists The program tries to pull Soundcloud data. In Soundcloud page I created an app, I have obtai
I've spent some time trying to figure out why the autostart, remote , and connect_back settings wont turn on. I've typed in: xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_port=9000 xdebug.remote_autostart=1 xdebug.remote_connect_back=1 ;xdebug.remote_host=192.168.1.108 All this into the php.ini file, restarted servers, and when I check the configuration page on the MAMP page, these settings still read OFF. Any idea why this is...
How do I access multiple cameras via RTSP and display them on WEB? I have 3 IP cameras installed. Along with them is a web client that I can view via the IP they've given to me. It is a HTTP page where I can view the streaming cameras installed. I discovered that I can also stream the cameras via the VLC player individually. camera 1 : rtsp://192.168.1.10/cam/stream/channel/01 camera 2 : rtsp://192.168.1.10/cam/stream/channel/02 camera 3 : rtsp://192.168.1.10/cam/stream/channel/03 When I type a URL on my VLC, I'm being requested with an RTSP authentication. Upon completing the form, I can stre
how do i access multiple camera via RTSP and display them on WEB? i have 3 IP camera installed, along with it is a web client that i can view via the IP theyve given to me. it is a HTTP page, where i can view the streaming camera installed. i discovered that i can also stream the camera via the VLC player individually. camera 1 : rtsp://192.168.1.10/cam/stream/channel/01 camera 2 : rtsp://192.168.1.10/cam/stream/channel/02 camera 3 : rtsp://192.168.1.10/cam/stream/channel/03 when i type a url on my vlc, im being requested with an rtsp authentication. upon completing the form, i can stream the
I want to have all requests that satisfy a certain constraint to go to a specific controller. So I need a catch-all route. How do I specify that in Rails? Is it something like this? match '*', to: 'subdomain_controller#show', constraints: {subdomain: /.+\.users/} Will that really catch all possible routes? It's important that none slip through even if there are many nested directories. Using Ruby on Rails 3.2, but ready to upgrade to 4.0. UPDATE: '*path' seems to work. However, the issue I'm running into is whenever the file exists in my public directory, Rails renders that instead.
I am getting this error for Data Driven testing with excel.I have added 3.6 version of POI Jar.Below is the ERROR : org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file: 'C:\Users\pjadhav1\AppData\Local\Temp\poifiles\poi-ooxml-747722852.tmp' at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:102) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:199) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:178) at org.apache.poi.util.PackageHelper.open(PackageHelper.java:53) at org.apache.poi.xssf.usermodel.XSSFWorkboo
I am new to android and I extensively searched for this. Any help would be much appreciated:) I have a requirement for an application which does the following: An application that runs in the background as a service that listens to the volume key(UP/Down). On this event an activity will be displayed in foreground. [I am able to do this from an Activity, however the activity has to be at the foreground and only after I press the volume button I get a toast.] Please HELP!!!
EDIT: I have done some testing with the following script (found here: PHP serial port data return from Arduino). It appears that even using fwrite to /dev/ttyUSB0 outputs my new command plus the last command sent from the device. This makes me think that maybe the serial port was not set up correctly (e.g. might need to use stty to change settings to clear the buffer) or there is something else I need to do (with php) to clear the buffer at /dev/ttyUSB0 before sending a new command. Any help would be appreciated, thanks. $fp =fopen("/dev/ttyUSB0", "w+"); if( !$fp) { echo "Error";die(); } fwrit
I am adding a constraint to Excel Solver. The constraint is saying an input data at location A3 must be either 0 or between 3 and 8. How could I add this constraint in Excel Solver since I could not find 'or' function in solver constraint box. It only has ">=", "<=", "=", "int", "bin", "dif" operators there. Many Thanks
In the following example, how do I ask the R to select more than one index if there is a tie (For example in row 3 the minimum is 2 which occurs for both x and y columns. However, sapply gives the index for x column only) (My apologizes if this looks like a naive question) df1< -structure(list(x = c(5, 2, 3), y = c(4, 3, 3)), .Names = c("x", "y"), row.names = c(NA, -3L), class = "data.frame") df1 x y 1 5 4 2 2 3 3 3 3 sapply(as.list(rownames(df1)),function(x) which.min(df1[x,])) y x x 2 1 1
I have been asked to use aif audio files on a website. I am using jplayer. Would there be a noticeable difference using .aif? Which browsers support .aif? Would you advise using .aif for the web? Would it mean I would need 3 versions of each track to cover all Browsers/OS? Like so: <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> <source src="horse.aif" type="audio/aif"> Your browser does not support the audio element. </audio> Thanks :)
I'm trying to import data from a XML file into a database. I've made a test script using BULK INSERT, but when I've tested on the live database, permissions for BULK are disabled. Attempt #1: BULK INSERT XMLTable FROM 'C:\Radu\test.xml' WITH (ROWTERMINATOR = '>'); So, I have continued research to find a way to avoid using BULK and found other options, such as OPENROWSET and OPENDATASOURCE. But unfortunately, rights for these operations are also revoked. Attempt #2: SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Text Driver (*.xml)};DefaultDir=C:\Radu\test.xml;', 'SELECT * FROM [test.xm
Hey everyone I'm currently having some trouble in making the switch statement coming back out around to the start of the menu. Instead it proceeds into another main function that I don't want it to unless the user chooses the right selection. here's the code I have anyway: int main() { int choice; bool menu = true; cout <<"Please select one of the following options: \n"; cout << "1: Play\n" "2: Help\n" "3: Config\n" "4: Quit\n"; cout << "Enter your selection (1, 2,3 or 4): "; cin >> choice; //***************************************************************************** // Switch menu to displa
I want to download a number of files which are as follows: http://example.com/directory/file1.txt http://example.com/directory/file2.txt http://example.com/directory/file3.txt http://example.com/directory/file4.txt . . http://example.com/directory/file199.txt http://example.com/directory/file200.txt Can anyone help me with it using shell scripting? Here is what I'm using but it is downloading only the first file. for i in {1..200} do exec wget http://example.com/directory/file$i.txt; done
I have a VBA regular expression which I would like to combine with VLOOKUP however it does not return the value based on the regular expression if used with VLOOKUP. This is what it returns when I execution the function =udfRegEx(A2,B2) String Microsoft Windows Server 2003, Standard Edition (64-bit) Regular expression ^([^,]*) Result Microsoft Windows Server 2003 However when I execute =IFERROR(VLOOKUP(udfRegEx(A2,RegularExpression!B2),[Sample.xls]Sheet1!$B$2:$E$4177,4,FALSE),0) it still returns Microsoft Windows Server 2003, Standard Edition (64-bit) Column B2 is the regular expression ^([^,]
I'm making a report in Cognos Report Studio and I'm having abit of trouble getting a count taht I need. What I need to do is count the number of IDs for a department. But I need to split the count between initiated and completed. If an ID occures more than once, it is to be counted as completed. The others, of course, will be initiated. So I'm trying to count the number of ID occurences for a distinct ID. Here is the query I've made in SQl Developer: SELECT COUNT((CASE WHEN COUNT(S.RFP_ID) > 8 THEN MAX(CT.GCT_STATUS_HISTORY_CLOSE_DT) END)) AS "Sales Admin Completed" ,COUNT((CASE WHEN COUNT(S.R
I just started with Handlebars.js and running into a small problem I'm using version 1.0.0 width data I get from JSON via jQuery. Everything works fine, my data gets pulled through to the template and the data gets displayed like expected, however I keep getting this error. Error: You must pass a string or Handlebars AST to Handlebars.compile. You passed undefined When I log source in the console I get this, I know it's not a string but this is what this tutorial explains http://javascriptplayground.com/blog/2012/05/javascript-templating-handlebars-tutorial/. Am I wrong? {{#sets}} <li class="p
I'm planning to rent a car in Argentina by one of the big, well-known companies. I'm also planning to drive to Chile for a day or two. I know that quite a lot of rental companies explicitly do not allow to cross into other countries with a rental car. However, when trying to book a car on one of the big rental car websites, I've almost always have trouble to find information about that point. I don't want to first write them an email or call them. Are there other ways to get this information? I'm talking about Europcar, Hertz, Budget, Avis, and Sixt.
I have a device/appliance that you cannot install drivers for. I would like to add the ability to support network/IPP/AirPrint printers by having the user add the IP Addresses. Since I am not printing through windows (which would use the IPP), how do I use IPP myself? Is there a c# client (or any windows library) out there that allows you to interact with IPP printers with the IPP protocol?
I want to created simple Android bluetooth Client-Server program Server Code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tv1=(TextView)findViewById(R.id.textView1); tv2=(TextView)findViewById(R.id.textView2); mBluetoothAdapter=BluetoothAdapter.getDefaultAdapter(); try { mBluetoothServerSocket=mBluetoothAdapter.listenUsingRfcommWithServiceRecord(name,uUID); mBluetoothAdapter.cancelDiscovery(); mBluetoothSocket=mBluetoothServerSocket.accept(); mInputStream=mBluetoothSocket.getInputStream(); //if(mInputStream.av
I have used openssl to create a .key and .cer file in pem format (you can read them). Now I want to create .pfx file from them. I have read openssl doumentation it says something like following command I can use openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer but I don't know which one is my .cer file (certificate.cer or CACert.cer) what is differences between these two files?
I plotted some of my data which is in this format Time SD Average Situation n se And I used this code library(ggplot2) ggplot(data, aes(x=Time, y=Average, colour=Situation)) + geom_errorbar(aes(ymin=Average-se, ymax=Average+se), width=.1) + geom_line() + geom_point() I want to do a T.test between the Exp and Control and I want to show significance in the graph using asterisks *. I am having a hard time looking for a code that does this. I know how to do a normal T.test but I really want those graphs that have asterisks to show significance.
I'm attempting to write an elisp function(s) to extract text from org files. Specifically, I want to be able to convert the values in an org-table into a list of lists, so that I can populate org-feeds-alist at startup time from a file outside of my .emacs. My functions look like this: (defun·org-config-parse-get-table-rows·(file) "Return·table·rows·minus·header" (with-temp-buffer ··(insert-file-contents·file) ··(cddr·(org-element-map·(org-element-parse-buffer)·'(table-row)·'identity)))) (defun·org-config-parse-get-table-cells·(file) ··(org-element-map·(org-config-parse-get-table-rows·file)·'(
i already can create a print to print a file in my windows forms. However, whenever i add this code: printDialog.PrinterSettings.DefaultPageSettings.Landscape = true; I can't see the Orientation of the page become LandScape, it is still Portrait. How do I make it LandScape as default? So, whenever i click PrintPreview or PrintFile, the Orientation of the page will become LandScape, not Portrait. Here is the code: private void PrintPreview(object sender, EventArgs e) { PrintPreviewDialog _PrintPreview = new PrintPreviewDialog(); _PrintPreview.Document = printDocument1; ((Form)_PrintPreview).Win
I am trying to login into a site using the mechanize module. My script is: import mechanize from mechanize import Browser def main(): try: br = mechanize.Browser() br.open("site name") print br.title() except: print "error" if __name__ == '__main__': main() Every time I run it I get ImportError: cannot import name GopherError Traceback (most recent call last): File "example.py", line 11, in <module> import mechanize File "C:\Python27\lib\site-packages\mechanize\__init__.py", line 85, in <modul e> from _mechanize import __version__ File "C:\Python27\lib\site-packages\mechanize\_mechanize.py", l
I'm using the Visual Studio 2013 form designer to edit a form. The size of the form in the designer window is too big so I want to zoom out. In applications like Photoshop or Blend I could (among other things) use the keyboard shortcut Ctrl-0 to fit the design to the screen. In Visual Studio how do I zoom out in the form design window?