Search Results

Search found 4791 results on 192 pages for 'mark in a2'.

Page 10/192 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Can I indicate where my MySQL parameter should go more meaningfully than just having a ? to mark the

    - by Paul H
    I've got a chunk of code where I can pass info into a MySQL command using parameters through an ODBC connection. Example code showing surname passed in using string surnameToLookFor: using (OdbcConnection DbConn = new OdbcConnection( connectToDB )) { OdbcDataAdapter cmd = new OdbcDataAdapter( "SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?", DbConn); OdbcParameter odbcParam = new OdbcParameter("surname", surnameToLookFor); cmd.SelectCommand.Parameters.Add(odbcParam); cmd.Fill(dsCustomers, "customers"); } What I'd like to know is whether I can indicate where my parameter should go more meaningfully than just having a ? to mark the position - as I could see this getting quite hard to debug if there are multiple parameters being replaced. I'd like to provide a name to the parameter in a manner something like this: SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?surname ", When I try this it just chokes. The following code public System.Data.DataSet Customer_Open(string sConnString, long ld) { using (MySqlConnection oConn = new MySqlConnection(sConnString)) { oConn.Open(); MySqlCommand oCommand = oConn.CreateCommand(); oCommand.CommandText = "select * from cust_customer where id=?id"; MySqlParameter oParam = oCommand.Parameters.Add("?id", MySqlDbType.Int32); oParam.Value = ld; oCommand.Connection = oConn; DataSet oDataSet = new DataSet(); MySqlDataAdapter oAdapter = new MySqlDataAdapter(); oAdapter.SelectCommand = oCommand; oAdapter.Fill(oDataSet); oConn.Close(); return oDataSet; } } is from http://www.programmingado.net/a-389/MySQL-NET-parameters-in-query.aspx and includes the fragment where id=?id Which would be ideal. Is this only available through the .Net connector rather than the ODBC? If it is possible to do using ODBC how would I need to change my code fragment to enable this?

    Read the article

  • how do I update the date type column?

    - by Muhammad Hammad
    update answers a1 set a1.FilingDate=( select date_sub( a2.FilingDate ,Interval 1000 Year) as FilingDate from answers a2 where Year(a2.FilingDate)>=3000 ) where Year(a1.FilingDate)>=3000 but it gives me the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update answers a1 set a1.FilingDate=( select date_sub(a2.FilingDate,Interval 10' at line 1 Can anyone tell me about the issue and its solution?

    Read the article

  • C++ pointers and constructors

    - by lego69
    if I have this snippet of the code A a1(i); A a2 = a1; A *pa1 = new A(a2); can somebody please explain what exactly the last line does, it makes copy of the a2 and pointer for this new object is pa1 or it just creates pointer for a2, thanks in advance

    Read the article

  • Thank you for joining us @ Collaborate!

    - by mark.kromer
    Many thanks to those of you that were able to join us @ the Oracle User Conference Collaborate 2010 this year in Vegas! We all had a great time and as promised, I am including a copy of the slides that I presented with Mark Rosenberg on PeopleSoft with Primavera to provide EPPM for the capital program & asset lifecycles: Collaborate presentation Asset Lifecycle with Primavera and PSFT Best, Mark

    Read the article

  • can't find what's wrong with my code :(

    - by blood
    the point of my code is for me to press f1 and it will scan 500 pixels down and 500 pixels and put them in a array (it just takes a box that is 500 by 500 of the screen). then after that when i hit end it will click on only on the color black or... what i set it to. anyway it has been doing odd stuff and i can't find why: #include <iostream> #include <windows.h> using namespace std; COLORREF rgb[499][499]; HDC hDC = GetDC(HWND_DESKTOP); POINT main_coner; BYTE rVal; BYTE gVal; BYTE bVal; int red; int green; int blue; int ff = 0; int main() { for(;;) { if(GetAsyncKeyState(VK_F1)) { cout << "started"; int a1 = 0; int a2 = 0; GetCursorPos(&main_coner); int x = main_coner.x; int y = main_coner.y; for(;;) { //cout << a1 << "___" << a2 << "\n"; rgb[a1][a2] = GetPixel(hDC, x, y); a1++; x++; if(x > main_coner.x + 499) { y++; x = main_coner.x; a1 = 0; a2++; } if(y > main_coner.y + 499) { ff = 1; break; } } cout << "done"; break; } if(ff == 1) break; } for(;;) { if(GetAsyncKeyState(VK_END)) { GetCursorPos(&main_coner); int x = main_coner.x; int y = main_coner.y; int a1 = -1; int a2 = -1; for(;;) { x++; a1++; rVal = GetRValue(rgb[a1][a2]); gVal = GetGValue(rgb[a1][a2]); bVal = GetBValue(rgb[a1][a2]); red = (int)rVal; // get the colors into __int8 green = (int)gVal; // get the colors into __int8 blue = (int)bVal; // get the colors into __int8 if(red == 0 && green == 0 && blue == 0) { SetCursorPos(main_coner.x + x, main_coner.y + y); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); Sleep(10); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); } if(x > main_coner.x + 499) { a1 = 0; a2++; } if(y > main_coner.y + 499) { Sleep(100000000000); break; } if(GetAsyncKeyState(VK_CONTROL)) { Sleep(100000); break; } } } } for(;;) { if(GetAsyncKeyState(VK_END)) { break; } } return 0; } anyone see what's wrong with my code :( (feel free to add tags)

    Read the article

  • iptables to block non-VPN-traffic if not through tun0

    - by dacrow
    I have a dedicated Webserver running Debian 6 and some Apache, Tomcat, Asterisk and Mail-stuff. Now we needed to add VPN support for a special program. We installed OpenVPN and registered with a VPN provider. The connection works well and we have a virtual tun0 interface for tunneling. To archive the goal for only tunneling a single program through VPN, we start the program with sudo -u username -g groupname command and added a iptables rule to mark all traffic coming from groupname iptables -t mangle -A OUTPUT -m owner --gid-owner groupname -j MARK --set-mark 42 Afterwards we tell iptables to to some SNAT and tell ip route to use special routing table for marked traffic packets. Problem: if the VPN failes, there is a chance that the special to-be-tunneled program communicates over the normal eth0 interface. Desired solution: All marked traffic should not be allowed to go directly through eth0, it has to go through tun0 first. I tried the following commands which didn't work: iptables -A OUTPUT -m owner --gid-owner groupname ! -o tun0 -j REJECT iptables -A OUTPUT -m owner --gid-owner groupname -o eth0 -j REJECT It might be the problem, that the above iptable-rules didn't work due to the fact, that the packets are first marked, then put into tun0 and then transmitted by eth0 while they are still marked.. I don't know how to de-mark them after in tun0 or to tell iptables, that all marked packet may pass eth0, if they where in tun0 before or if they going to the gateway of my VPN provider. Does someone has any idea to a solution? Some config infos: iptables -nL -v --line-numbers -t mangle Chain OUTPUT (policy ACCEPT 11M packets, 9798M bytes) num pkts bytes target prot opt in out source destination 1 591K 50M MARK all -- * * 0.0.0.0/0 0.0.0.0/0 owner GID match 1005 MARK set 0x2a 2 82812 6938K CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 owner GID match 1005 CONNMARK save iptables -nL -v --line-numbers -t nat Chain POSTROUTING (policy ACCEPT 393 packets, 23908 bytes) num pkts bytes target prot opt in out source destination 1 15 1052 SNAT all -- * tun0 0.0.0.0/0 0.0.0.0/0 mark match 0x2a to:VPN_IP ip rule add from all fwmark 42 lookup 42 ip route show table 42 default via VPN_IP dev tun0

    Read the article

  • iptables to block VPN-traffic if not through tun0

    - by dacrow
    I have a dedicated Webserver running Debian 6 and some Apache, Tomcat, Asterisk and Mail-stuff. Now we needed to add VPN support for a special program. We installed OpenVPN and registered with a VPN provider. The connection works well and we have a virtual tun0 interface for tunneling. To archive the goal for only tunneling a single program through VPN, we start the program with sudo -u username -g groupname command and added a iptables rule to mark all traffic coming from groupname iptables -t mangle -A OUTPUT -m owner --gid-owner groupname -j MARK --set-mark 42 Afterwards we tell iptables to to some SNAT and tell ip route to use special routing table for marked traffic packets. Problem: if the VPN failes, there is a chance that the special to-be-tunneled program communicates over the normal eth0 interface. Desired solution: All marked traffic should not be allowed to go directly through eth0, it has to go through tun0 first. I tried the following commands which didn't work: iptables -A OUTPUT -m owner --gid-owner groupname ! -o tun0 -j REJECT iptables -A OUTPUT -m owner --gid-owner groupname -o eth0 -j REJECT It might be the problem, that the above iptable-rules didn't work due to the fact, that the packets are first marked, then put into tun0 and then transmitted by eth0 while they are still marked.. I don't know how to de-mark them after in tun0 or to tell iptables, that all marked packet may pass eth0, if they where in tun0 before or if they going to the gateway of my VPN provider. Does someone has any idea to a solution? Some config infos: iptables -nL -v --line-numbers -t mangle Chain OUTPUT (policy ACCEPT 11M packets, 9798M bytes) num pkts bytes target prot opt in out source destination 1 591K 50M MARK all -- * * 0.0.0.0/0 0.0.0.0/0 owner GID match 1005 MARK set 0x2a 2 82812 6938K CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 owner GID match 1005 CONNMARK save iptables -nL -v --line-numbers -t nat Chain POSTROUTING (policy ACCEPT 393 packets, 23908 bytes) num pkts bytes target prot opt in out source destination 1 15 1052 SNAT all -- * tun0 0.0.0.0/0 0.0.0.0/0 mark match 0x2a to:VPN_IP ip rule add from all fwmark 42 lookup 42 ip route show table 42 default via VPN_IP dev tun0

    Read the article

  • SQL SERVER – SSMS: Disk Usage Report

    - by Pinal Dave
    Let us start with humor!  I think we the series on various reports, we come to a logical point. We covered all the reports at server level. This means the reports we saw were targeted towards activities that are related to instance level operations. These are mostly like how a doctor diagnoses a patient. At this point I am reminded of a dialog which I read somewhere: Patient: Doc, It hurts when I touch my head. Doc: Ok, go on. What else have you experienced? Patient: It hurts even when I touch my eye, it hurts when I touch my arms, it even hurts when I touch my feet, etc. Doc: Hmmm … Patient: I feel it hurts when I touch anywhere in my body. Doc: Ahh … now I get it. You need a plaster to your finger John. Sometimes the server level gives an indicator to what is happening in the system, but we need to get to the root cause for a specific database. So, this is the first blog in series where we would start discussing about database level reports. To launch database level reports, expand selected server in Object Explorer, expand the Databases folder, and then right-click any database for which we want to look at reports. From the menu, select Reports, then Standard Reports, and then any of database level reports. In this blog, we would talk about four “disk” reports because they are similar: Disk Usage Disk Usage by Top Tables Disk Usage by Table Disk Usage by Partition Disk Usage This report shows multiple information about the database. Let us discuss them one by one.  We have divided the output into 5 different sections. Section 1 shows the high level summary of the database. It shows the space used by database files (mdf and ldf). Under the hood, the report uses, various DMVs and DBCC Commands, it is using sys.data_spaces and DBCC SHOWFILESTATS. Section 2 and 3 are pie charts. One for data file allocation and another for the transaction log file. Pie chart for “Data Files Space Usage (%)” shows space consumed data, indexes, allocated to the SQL Server database, and unallocated space which is allocated to the SQL Server database but not yet filled with anything. “Transaction Log Space Usage (%)” used DBCC SQLPERF (LOGSPACE) and shows how much empty space we have in the physical transaction log file. Section 4 shows the data from Default Trace and looks at Event IDs 92, 93, 94, 95 which are for “Data File Auto Grow”, “Log File Auto Grow”, “Data File Auto Shrink” and “Log File Auto Shrink” respectively. Here is an expanded view for that section. If default trace is not enabled, then this section would be replaced by the message “Trace Log is disabled” as highlighted below. Section 5 of the report uses DBCC SHOWFILESTATS to get information. Here is the enhanced version of that section. This shows the physical layout of the file. In case you have In-Memory Objects in the database (from SQL Server 2014), then report would show information about those as well. Here is the screenshot taken for a different database, which has In-Memory table. I have highlighted new things which are only shown for in-memory database. The new sections which are highlighted above are using sys.dm_db_xtp_checkpoint_files, sys.database_files and sys.data_spaces. The new type for in-memory OLTP is ‘FX’ in sys.data_space. The next set of reports is targeted to get information about a table and its storage. These reports can answer questions like: Which is the biggest table in the database? How many rows we have in table? Is there any table which has a lot of reserved space but its unused? Which partition of the table is having more data? Disk Usage by Top Tables This report provides detailed data on the utilization of disk space by top 1000 tables within the Database. The report does not provide data for memory optimized tables. Disk Usage by Table This report is same as earlier report with few difference. First Report shows only 1000 rows First Report does order by values in DMV sys.dm_db_partition_stats whereas second one does it based on name of the table. Both of the reports have interactive sort facility. We can click on any column header and change the sorting order of data. Disk Usage by Partition This report shows the distribution of the data in table based on partition in the table. This is so similar to previous output with the partition details now. Here is the query taken from profiler. SELECT row_number() OVER (ORDER BY a1.used_page_count DESC, a1.index_id) AS row_number ,      (dense_rank() OVER (ORDER BY a5.name, a2.name))%2 AS l1 ,      a1.OBJECT_ID ,      a5.name AS [schema] ,       a2.name ,       a1.index_id ,       a3.name AS index_name ,       a3.type_desc ,       a1.partition_number ,       a1.used_page_count * 8 AS total_used_pages ,       a1.reserved_page_count * 8 AS total_reserved_pages ,       a1.row_count FROM sys.dm_db_partition_stats a1 INNER JOIN sys.all_objects a2  ON ( a1.OBJECT_ID = a2.OBJECT_ID) AND a1.OBJECT_ID NOT IN (SELECT OBJECT_ID FROM sys.tables WHERE is_memory_optimized = 1) INNER JOIN sys.schemas a5 ON (a5.schema_id = a2.schema_id) LEFT OUTER JOIN  sys.indexes a3  ON ( (a1.OBJECT_ID = a3.OBJECT_ID) AND (a1.index_id = a3.index_id) ) WHERE (SELECT MAX(DISTINCT partition_number) FROM sys.dm_db_partition_stats a4 WHERE (a4.OBJECT_ID = a1.OBJECT_ID)) >= 1 AND a2.TYPE <> N'S' AND  a2.TYPE <> N'IT' ORDER BY a5.name ASC, a2.name ASC, a1.index_id, a1.used_page_count DESC, a1.partition_number Using all of the above reports, you should be able to get the usage of database files and also space used by tables. I think this is too much disk information for a single blog and I hope you have used them in the past to get data. Do let me know if you found anything interesting using these reports in your environments. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL Tagged: SQL Reports

    Read the article

  • log4j floods my console

    - by srikanth VM
    This is the log4j.properties that i have in my app log4j.rootLogger=B C log4j.logger.A=INFO, A1 log4j.debug=false log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %C - %m%n log4j.logger.B=INFO, A2 log4j.debug=false log4j.appender.A2=org.apache.log4j.FileAppender log4j.appender.A2.file=PRIME-log.txt log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %C - %m%n log4j.logger.C=INFO, A3 log4j.appender.A3=org.apache.log4j.FileAppender log4j.appender.A3.file=employee_pass_regeneration-log.txt log4j.appender.A3.layout=org.apache.log4j.PatternLayout log4j.appender.A3.layout.ConversionPattern=%d [%t] %-5p %C - %m%n I only want File appender so i only use that , but some how my console is always flooded with DEBUG messages which i have never used 8704 [http-8080-2] DEBUG org.springframework.web.servlet.view.JstlView - Rendering view with name 'passIndex' with model null and static attributes {} I guess these are all system messages , but with these debug messages its really hard to debug actually i mean i cannot find my own sysouts i tried log4j.debug=false but still i get these messages

    Read the article

  • Stack & heap understanding question

    - by Petr
    Hi, I would really appreciate if someone could tell me whether I understand it well: class X { A a1=new A() //reference on the stack, object value on the heap a1.VarA=5; //on the stack - value type A a2=new A() //reference on the stack, object value on the heap a2.VarA=10; //on the stack - value type a1=a2; //on the stack, the target of a1 reference is updated to a2 value on the heap //also both a1 and a2 references are on the stack, while their "object" values on the heap. But what about VarA variable, its still pure value type? } class A { int VarA; }

    Read the article

  • How to rotate an SSE/AVX vector

    - by user1584773
    I need to perform a rotate operation with as little clock cycle as possible. In the first case let's assume __m128i as source and dest type source: || A0 || A1 || A2 || A3 || dest : || A1 || A2 || A3 || A0 || dest = (__m128i)_mm_shuffle_epi32((__m128i)source, _MM_SHUFFLE(0,3,2,1)); Now I want to do the same whit AVX intrinsics So let's assume this time __m256i as source and dest type source: || A0 || A1 || A2 || A3 || A4 || A5 || A6 || A7 || dest : || A1 || A2 || A3 || A4 || A5 || A6 || A7 || A0 || The Avx intrinsics is missing most of the corresponding SSE integer operations. Maybe there is some way go get the desider output working with the floating point version. I've tryed with: dest = (__m256i)_mm256_shuffle_ps((__m256)source, (__m256)source, _MM_SHUFFLE(0,3,2,1)); but what I get is: || A0 || A2 || A3 || A4 || A5 || A6 || A7 || A1 || Any Idea on how to solve this in an efficient way? (without mixing SSE and AVX operation and without "manually" inverting A0 and A1 Thanks in advance!

    Read the article

  • Entropy using Decision Tree's

    - by Matt Clements
    Train a decision tree on the data represented by attributes A1, A2, A3 and outcome C described below: A1 A2 A3 C 1 0 1 0 0 1 1 1 0 0 1 0 For log2(1/3) = 1.6 and log2(2/3) = 0.6, answer the following questions: a) What is the value of entropy H for the given set of training example? b) What is the portion of the positive samples split by attribute A2? c) What is the value of information gain, G(A2), of attribute A2? d) What is IFTHEN rule(s) for the decision tree?

    Read the article

  • Why is LSHW Only listing one of my two HDDs?

    - by Mark
    I have a 120GB HDD and a 1TB HDD in the system. I installed Ubuntu Server using LVM on the 120GB. After installation I added the 1TB to the existing volume group and added 10GB to /home as a test. My understanding is that lshw is supposed to list hardware. What's the difference here? mark@server:~$ sudo lshw -short -c disk H/W path Device Class Description ========================================================= /0/100/1f.2/0 /dev/sda disk 120GB ST3120026AS /0/100/1f.2/1 /dev/cdrom disk DVD+-RW GH50N /0/1/0.0.0 /dev/sdc disk SCSI Disk /0/1/0.0.1 /dev/sdd disk SCSI Disk /0/1/0.0.2 /dev/sde disk SCSI Disk /0/1/0.0.3 /dev/sdf disk SCSI Disk The 1TB only shows up as a volume, not as a disk. mark@server:~$ sudo lshw -short .... /0/100/1f.2/0 /dev/sda disk 120GB ST3120026AS /0/100/1f.2/0/1 /dev/sda1 volume 476MiB Linux filesystem partition /0/100/1f.2/0/2 /dev/sda2 volume 111GiB Linux LVM Physical Volume partition /0/100/1f.2/1 /dev/cdrom disk DVD+-RW GH50N /0/100/1f.2/0.0.0 /dev/sdb volume 931GiB WDC WD1001FALS-0 Thanks, Mark

    Read the article

  • Slow wired internet connection on Realtek RTL8168-8111 (Rev 6)

    - by Mark
    I keep on seeing issues people are having with their wireless. I am having an issue with being wired into my router. I installed Ubuntu 11.10 the other day, on my custom PC. The motherboard I have installed on this PC is an ASUS P8H61-M. The issue I am having is with my speed. I have a dual boot, windows 7 and the new Ubuntu. On my Windows install I am getting test speeds from Speakeasy at 17Mbps and actual downloads around 2-3MB/s. With Ubuntu, I am getting test speeds from Speakeasy at 1.14Mbps and actual downloads around 60KB/s. I have disabled IPv6 and am no using GoogleDNS for my DNS, but it hasn't resolved the issue. I have scanned my router (WRT54GS Linksys) to disable IPv6 connections, and I am not seeing any option for that. I cannot figure out why I am getting such sluggish internet connection. Any help to resolve would be great! I performed an iconfig -a with these results: mark@Mark-ASUS:~$ ifconfig -a eth0 Link encap:Ethernet HWaddr f4:6d:04:d1:2c:4e inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::f66d:4ff:fed1:2c4e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21888 errors:0 dropped:21888 overruns:0 frame:21888 TX packets:21068 errors:0 dropped:90 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:26348337 (26.3 MB) TX bytes:2217140 (2.2 MB) Interrupt:46 Base address:0xc000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:7 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:952 (952.0 B) TX bytes:952 (952.0 B) My specs are: mark@Mark-ASUS:~$ sudo lspci -nn 04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) 06:00.0 PCI bridge [0604]: ASMedia Technology Inc. Device [1b21:1080] (rev 01) udev information: KERNEL[11.351405] add /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/net/eth0 (net) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1c.2/0000:04:00.0/net/eth0 SUBSYSTEM=net INTERFACE=eth0 IFINDEX=2 SEQNUM=1542 UDEV [11.363905] add /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/net/eth0 (net) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1c.2/0000:04:00.0/net/eth0 SUBSYSTEM=net INTERFACE=eth0 IFINDEX=2 SEQNUM=1542 ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Co., Ltd. ID_MODEL_FROM_DATABASE=RTL8111/8168B PCI Express Gigabit Ethernet controller ID_BUS=pci ID_VENDOR_ID=0x10ec ID_MODEL_ID=0x8168 ID_MM_CANDIDATE=1 dmesg information: [ 2.855982] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded [ 2.856366] r8169 0000:04:00.0: eth0: RTL8168b/8111b at 0xffffc9000064c000, f4:6d:04:d1:2c:4e, XID 0c900800 IRQ 46 [ 12.540956] r8169 0000:04:00.0: eth0: link down [ 12.540961] r8169 0000:04:00.0: eth0: link down [ 12.541173] ADDRCONF(NETDEV_UP): eth0: link is not ready I took out a lot of information that did not pertain to eth0, because the previous edits wouldn't save. If I need any more information, let me know. I would love to get this resolved. The other issue I am noticing is sometimes my connection disconnects all together, for about a minute, then it reconnects.

    Read the article

  • How to change shortcut keys in Thunderbird 3 for Linux?

    - by Josh
    I use Thunderbird on Ubuntu Linux and have just upgraded to Ubuntu 10 / Thunderbird 3. One of my gripes however is that Thunderbird uses a number of shortcut keys that have no secondary key requirements, for example, "Mark as Read" is M. Not ControlM. Just M. Worse, "Mark as Junk" is J. Which means I sometimes inadvertently mark messages as Junk. How can I customize Thunderbird's shortcuts so, for example, "Mark as Junk" is ControlJ?

    Read the article

  • Iphone SDK - adding UITableView to UIView

    - by Shashi
    Hi, I am trying to learn how to use different views, for this sample test app, i have a login page, upon successful logon, the user is redirected to a table view and then upon selection of an item in the table view, the user is directed to a third page showing details of the item. the first page works just fine, but the problem occurs when i go to the second page, the table shown doesn't have title and i cannot add title or toolbar or anything other than the content of the tables themselves. and when i click on the item, needless to say nothing happens. no errors as well. i am fairly new to programming and have always worked on Java but never on C(although i have some basic knowledge of C) and Objective C is new to me. Here is the code. import @interface NavigationTestAppDelegate : NSObject { UIWindow *window; UIViewController *viewController; IBOutlet UITextField *username; IBOutlet UITextField *password; IBOutlet UILabel *loginError; //UINavigationController *navigationController; } @property (nonatomic, retain) IBOutlet UIViewController *viewController; @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITextField *username; @property (nonatomic, retain) IBOutlet UITextField *password; @property (nonatomic, retain) IBOutlet UILabel *loginError; -(IBAction) login; -(IBAction) hideKeyboard: (id) sender; @end import "NavigationTestAppDelegate.h" import "RootViewController.h" @implementation NavigationTestAppDelegate @synthesize window; @synthesize viewController; @synthesize username; @synthesize password; @synthesize loginError; pragma mark - pragma mark Application lifecycle -(IBAction) hideKeyboard: (id) sender{ [sender resignFirstResponder]; } (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch //RootViewController *rootViewController = [[RootViewController alloc] init]; //[window addSubview:[navigationController view]]; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; return YES; } -(IBAction) login { RootViewController *rootViewController = [[RootViewController alloc] init]; //NSString *user = [[NSString alloc] username. if([username.text isEqualToString:@"test"]&&[password.text isEqualToString:@"test"]){ [window addSubview:[rootViewController view]]; //[window addSubview:[navigationController view]]; [window makeKeyAndVisible]; //rootViewController.awakeFromNib; } else { loginError.text = @"LOGIN ERROR"; [window addSubview:[viewController view]]; [window makeKeyAndVisible]; } } (void)applicationWillTerminate:(UIApplication *)application { // Save data if appropriate } pragma mark - pragma mark Memory management (void)dealloc { //[navigationController release]; [viewController release]; [window release]; [super dealloc]; } @end import @interface RootViewController : UITableViewController { IBOutlet NSMutableArray *views; } @property (nonatomic, retain) IBOutlet NSMutableArray * views; @end // // RootViewController.m // NavigationTest // // Created by guest on 4/23/10. // Copyright MyCompanyName 2010. All rights reserved. // import "RootViewController.h" import "OpportunityOne.h" @implementation RootViewController @synthesize views; //@synthesize navigationViewController; pragma mark - pragma mark View lifecycle (void)viewDidLoad { views = [ [NSMutableArray alloc] init]; OpportunityOne *opportunityOneController; for (int i=1; i<=20; i++) { opportunityOneController = [[OpportunityOne alloc] init]; opportunityOneController.title = [[NSString alloc] initWithFormat:@"Opportunity %i",i]; [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: [[NSString alloc] initWithFormat:@"Opportunity %i",i], @ "title", opportunityOneController, @"controller", nil]]; self.title=@"GPS"; } /*UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init]; temporaryBarButtonItem.title = @"Back"; self.navigationItem.backBarButtonItem = temporaryBarButtonItem; [temporaryBarButtonItem release]; */ //self.title =@"Global Platform for Sales"; [super viewDidLoad]; //[temporaryBarButtonItem release]; //[opportunityOneController release]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. // self.navigationItem.rightBarButtonItem = self.editButtonItem; } pragma mark - pragma mark Table view data source // Customize the number of sections in the table view. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [views count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell. cell.textLabel.text = [[views objectAtIndex:indexPath.row] objectForKey:@"title"]; return cell; } pragma mark - pragma mark Table view delegate (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //UIViewController *targetViewController = [[views objectAtIndex:indexPath.row] objectForKey:@"controller"]; UIViewController *targetViewController = [[views objectAtIndex:indexPath.row] objectForKey:@"controller"]; [[self navigationController] pushViewController:targetViewController animated:YES]; } pragma mark - pragma mark Memory management (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Relinquish ownership any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. // For example: self.myOutlet = nil; } (void)dealloc { [views release]; [super dealloc]; } @end Wow, i was finding it real hard to post the code. i apologize for the bad formatting, but i just couldn't get past the formatting rules for this text editor. Thanks, Shashi

    Read the article

  • How do you mark class with TypeConverter that is not in referenced solution?

    - by Greg McGuffey
    I have a class that I've written a TypeConverter for. I want to keep the TypeConverter separate from the main solution, as it is only needed at design time and have an extensibility project now that contains the TypeConverter. Thus, when I deploy, I don't need to deploy the extensibility assembly at all. However, I can't figure out the appropriate string to use in the attribute to actually connect the class to the converter. Note I can't use this: [TypeConverter(typeof(MyConverter)] because MyConverter is in a project that isn't referenced. I need to use the string overload, but can't figure out what to use: [TypeConverter("what the heck goes in here!")] I think I need maybe a path to the assembly, maybe a GUID, the class name...just not sure...

    Read the article

  • ASP.NET MVC: How to allow some HTML mark-up in Html Encoded content?

    - by Dr. Zim
    Is there some magic existing code in MVC 2 to Html.Encode() strings and allow certain html markup, like paragraph marks and breaks? (coming from a Linq to SQL database field) A horrible code example to achieve the effect: Html.Encode(Model.fieldName).Replace("&lt;br /&gt;", "<br />") What would be really nice is to overload something and pass to it an array (or object) full of allowed html tags.

    Read the article

  • What does the question mark at then end of a css include url do?

    - by Bob Dylan
    I've noticed that on some websites (including SO) the link to the CSS will look like: <link rel="stylesheet" href="http://sstatic.net/so/all.css?v=6638"> I would say its safe to assume that ?v=6638 tells the browser to load version 6638 of the css file. But can I do this on my websites and can I include different versions of my CSS file just by changing the numbers?

    Read the article

  • What does the question mark at then end of a css file mean/do?

    - by Bob Dylan
    I've noticed that on some websites (including SO) the link to the CSS will look like: <link rel="stylesheet" href="http://sstatic.net/so/all.css?v=6638"> I would say its safe to assume that ?v=6638 tells the browser to load version 6638 of the css file. But can I do this on my websites and can I include different versions of my CSS file just by changing the numbers?

    Read the article

  • SQL: Speed Improvement - Cluttered union query

    - by vol7ron
    SELECT * FROM ( SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( a.user_id = b.user_id ) UNION SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( lower(a.f_name)=lower(b.f_name) AND lower(a.l_name)=lower(b.l_name) ) ) foo -- UNION -- SELECT a.user_id , a.f_name , a.l_name , '' , '' , '' FROM current_tbl a WHERE a.user_id NOT IN ( select user_id from( SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( a.user_id = b.user_id ) UNION SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( lower(a.f_name)=lower(b.f_name) AND lower(a.l_name)=lower(b.l_name) ) ) bar ) ORDER BY user_id Example of table population: current_tbl: ------------------------------- user_id | f_name | l_name ---------+----------+---------- A1 | Adam | Acorn A2 | Beth | Berry A3 | Calv | Chard | | import_tbl: ------------------------------- user_id | f_name | l_name ---------+----------+---------- A1 | Adam | Acorn A2 | Beth | Butcher <- last_name different | | Expected Output: ----------------------------------------------------------------------- user_id1 | f_name1 | l_name1 | user_id2 | f_name2 | l_name2 ----------+-----------+-----------+------------+-----------+----------- A1 | Adam | Acorn | A1 | Adam | Acorn A2 | Beth | Berry | A2 | Beth | Butcher A3 | Calv | Chard | | | Doing this method gets rid of conditions where the row would be: A2 | Beth | Berry | A2 | Beth | Butcher But it keeps the A3 row I hope this makes sense and I haven't overly simplified it. This is a continuation question from my other question. The succession of these improvements has dropped the query down from ~32000ms to where it's at now ~1200ms - quite an improvement. I supect I can optimize by using UNION ALL in the subquery and of course the usual index optimizations, but I'm looking for the best SQL optimization. FYI this particular case is for PostgreSQL.

    Read the article

  • Is there a way to get Apache to serve files with the question mark in their name?

    - by ldrg
    I scraped a bunch of pages using wget -m -k -E. The resulting files have names in the form foo.php?bar.html. Apache guesses everything after the ? is a query string, is there a way to tell it to ignore the ? as the query string delimiter (and see foo.php?bar.html as the requested file and not foo.php)? To save you a trip to wget manpage: -m : mirror recursively -E : foo.php?bar becomes foo.php?bar.html -k : convert links in pages (foo.php?bar now links to foo.php?bar.html inside of all the pages so they display properly)

    Read the article

  • Regex to identify rows that do not contain exact number of occurences of quotemark character using Notepad++

    - by SamAspin
    I would like to be able to jump to rows that dont contain 6 quotemarks in a quoted-CSV file as it feels like a good way to identify broken rows. I think using a regular expression with Notepad++'s find features would be a sensible approach but I'm not sure how to pick the rows up. 6 quotemarks (") would suggest a complete row so I want to skip to any row that does not contain 6. Here is some sample data to play with, in this example its the 4th line I'd like to jump to "sam","mark","dave" "sam","mark","dave" "sam","mark","dave" "sam","mark"," dave" "sam","mark","dave" "sam","mark","dave"

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >