This is surprisingly difficult. Consider it a snippet. Deletes all tables from a sql server schema. Useful for those times on your dev machine where you need to tear down all the cruft that has built up on your server due to refactoring of object relationally mapped tables. --Author: Cameron Block DECLARE @SCHEMA VARCHAR(50) = 'cblock'; DECLARE @LOOP_PREDICATE INT = 1; WHILE (@LOOP_PREDICATE > 0) BEGIN DECLARE CUR_PARENTS CURSOR FOR select referenced_object_id "REF_ID", T.name "TABLE", S.name "SCHEMA" from sys.foreign_keys FK JOIN SYS.TABLES T ON T.object_id = FK.referenced_object_id JOIN sys.schemas s ON t.[schema_id] = s.[schema_id] JOIN INFORMATION_SCHEMA.TABLES I ON i.TABLE_NAME = …

Member Avatar
Member Avatar
+1 forum 2

When this news came across I only had to think of MSFT's prior acquisitions to think this may not end well. As the song goes " Should I Stay or Should I Go"?

Member Avatar
Member Avatar
+1 forum 7

For the past several years I have been feeling quite embarrassed about my coding abilities. I've been self studying most nights trying to catch up to my peers but I feel like I have a moving target. I feel like my years of work experience does not reflect my coding ability at all. This post will go over my programming history, then how I am currently studying to improve my technical skills, then finally what I think my weaknesses are as a developer. What I am trying to get out of this post is how I can improve as a …

Member Avatar
Member Avatar
+7 forum 8

hello sir how can I get my system short date format in a label in vb. net. I try this code : Label1.Text = System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern() but show wrong data. all time show "M/d/yyyy" format. I change it(to "dd/MM/yyyy") manually and by coding result is same("M/d/yyyy") please help me..... For Change the Format: Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", "dd/MM/yyyy")

Member Avatar
Member Avatar
+1 forum 3

Hi! My name is Jung and I'm new to VBNET I have already tried many ways to write codes for "btnSearch" but seems like nothing works.. I really need help for this as the deadline is around the corner :'( Below are my codes for Search button.. ![btnsearch.PNG](/attachments/large/4/76be068c625e23d9a57e969a97509bee.PNG "align-center")

Member Avatar
Member Avatar
+0 forum 2

#include<stdio.h> int main() { int x=5; int y=50; do{ x = x + 10; }while (x <y); printf("%d\t%d", x,y); } I wonder why i compile is 55 50 why not 15 50???

Member Avatar
Member Avatar
+0 forum 1

Hi, I am currently working on a VB form for a college assignment. I am trying to add quantities from a ListBox and then display the result in a TextBox for a pizza delivery order by using a button. So far, the Listbox shows: pizza type Quantity pizza price Total pizza price The Total pizza price is the value that I want to add together and then show in a TextBox as an Order Price. This is my form and Code for the button: ![form1.PNG](/attachments/small/4/3da7c8769c68d4284e57a3e1644c9627.PNG "align-left") ![form.PNG](/attachments/small/4/a41c26183938bc03cb984f467c5bb361.PNG "align-left") ![form1_buttoncode.PNG](/attachments/small/4/710dcd869220381dab6204948dc6f362.PNG "allign right") The code is a work in progress and as …

Member Avatar
Member Avatar
+0 forum 5

Hello everyone, I am having trouble with my program its solving expressions and when I compile it I get a "Illegal start of expresson" line in my output. I am using Jgrasp as my softwear. May I ask to reveiw my code and see on what I did wrong? I am asking for learning purposes. Thank You. import java.util.ArrayList; import java.util.Scanner; import static java.lang.Integer.*; import static java.lang.System.*; public class ExpressionSolver { int answer; String expString; ArrayList<String> exp; public ExpressionSolver(String s) { setExpression(s); } public void setExpression(String s) { expString = s; exp = new ArrayList<String>(); for(String temp: s.split(" ")) { …

Member Avatar
Member Avatar
+1 forum 25

How can I show the database in a single mode (windows or SQL authentications mode) please help me..... How can I Show the database in a single mode (windows or SQL authentications mode) please help me. I create a project VB.NET 2010 and SQL server 2008r2 , When I login sa account show the database it is all right. But problem is when I connect windows authentication mode same database show on there, and it is fully accessible. I want to when I login sa account show the database, not show when login in windows authentication mode.

Member Avatar
Member Avatar
+0 forum 1

I need some help building a bootstrap Angular UI modal. This is what I have so far, but I am pretty sure it is wrong. Any assistance would be good. This actually appears to be doing mostly bootstrap stuff. It was originally jquery, but I figured out the hard way that jquery does not mix with Angular Js well. <div id="excelModal" modal="excelModal" close="cancel()" hidden> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" hidden>&times;</button> <h4 class="modal-title">Excel Upload</h4> </div> <div class="modal-body"> <p>Please upload an excel file that contains the data you are wishing to include in the report parameters.</p> </div> …

Member Avatar
Member Avatar
+0 forum 1

Ok I have a workbook that have 5 worksheets for a 5 year span. On each of the worksheets are there is a list of countries that make up the combobox (which works perfectly). On my userform I have a frame on the userform that represent each worksheet. **My problem is that I can't get the textboxes to populate based on the combobox selection. If that country is on three of the sheets I need for it to populate according to the year.** This code works perfectly with the exception of populating my label boxes with line one starting with …

Member Avatar
Member Avatar
+0 forum 6

Does anybody know whether System.Data.SqlLite has the capability to do a Change notification callback when one of it's tables is changed? I know that Python can do it by calling the C api, but This is kind of beyond me. I know I have done this before on an oracle system, and I know it is possible on a Sql server system, the problem being I have an appication that I wanted to avoid the network overhead and simply use an in-memory database.

Member Avatar
Member Avatar
+0 forum 3

I have a bootstrap view which I am trying to get a modal working for. Unfortunately the modal is displaying as part of the page, not invisable. So it is displaying with it's content as part of the page. Here is my code: <!-- Placing excel upload modal here... --> @using (Html.BeginForm("UploadExcel", "Home", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" })) { <div class="modal fade" id="excelModal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Excel Upload</h4> </div> <div class="modal-body"> <p>Please upload an excel file that contains the data you are wishing to include in …

Member Avatar
Member Avatar
+0 forum 2

Hello fellow python lovers of daniweb.com. This isn't as much a question as much as the fact that I want to see how different people would go about using python to inject an SQl database. I made a script were you can access the ip and run a command. NOTE:Obviously I didn't give an actual database. Who am I kidding you guys aren't stupid. Here's my injection script import MySQLdb db = MySQLdb.connect(host="localhost", # your host, usually localhost user="USER", # your username passwd="PWD", # your password db="MySQLdb") # name of the data base # you must create a Cursor object. …

Member Avatar
Member Avatar
+0 forum 4

I'm trying to make a button that when pressed for a short while will close the form but when pressed for a long time *e.g. 5s* the form's process will be killed. I'm trying to achieve this with a timer. Private Sub CloseLongTimer_Tick(sender As Object, e As EventArgs) Handles CloseLongTimer.Tick Dim SetTime As Integer = 0 SetTime = SetTime + 1 If SetTime < 500 Then Me.Close() ElseIf SetTime > 499 And SetTime < 1001 Then System.Environment.Exit(1) ElseIf SetTime > 1000 Then CloseLongTimer.Stop() End If End Sub Private Sub CloseButton_MouseDown(sender As Object, e As EventArgs) Handles CloseButton.MouseDown CloseLongTimer.Start() End Sub …

Member Avatar
Member Avatar
+0 forum 4

Fellow Python developers, Python has a sorted() or sort() function to implement ascending or descending order programs,but supposing if i want to develop a ascending order program that takes user input and ascends or descends them,how should I go about? For Example: Lets Say i want to convert this C program to Python? # include <iostream.h> # include <conio.h> void main() { int a[10],i,j,n,temp; clrscr(); cout<<"\nEnter n nos: "; cin>>n; cout<<"\nEnter the numbers: "; for(i=0;i<n;i++) cin>>a[i]; for(i=0;i<n;i++) for(j=i+1;j<n;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } for(i=0;i<n;i++) cout<<a[i]<<endl; getch(); } This is an ascending order program in C. Thanks in …

Member Avatar
Member Avatar
+0 forum 4

The snippet shows how to create a menu on a windows form and test it. Original code via BCX, modified to compile with Dev C++ as a Windows Application. This approach does speed up writing of GUI programs.

Member Avatar
Member Avatar
+1 forum 2

Hi i have been spending the last few days deciding on an IDE that would let me program in Java, C++ and python and notepad++ looked pretty good. The only issue is i cant work out how to make the program run once i have made it. I looked in google and i couldn't find any tutorials to set it for python but if anyone could help that would be greatly appreciated. Thanks!

Member Avatar
Member Avatar
+1 forum 8

i want to convert my old desktop windows program to a language that is independent of microsoft .. don't ask why. ----------------------------------------------------------- .. my old program is written in visual-basic (vb.net) and works with microsoft access databases. .. the old program contains about 20 different forms for data input/output. .. the old program contains about 70,000 lines of code. .. it is distributed to my windows users for installation using a standard (.exe) or (.msi) file. .. it contains numerous modules or sub-routines which require global variables. .. it uses arrays. .. it uses list boxes (tables), checkboxes, radio buttons, …

Member Avatar
Member Avatar
+2 forum 3

Hello, I'm hoping for some help with a regex that has me stumped. My skill with regex is rather rudimentary. To start, here are a couple of example URLs, and whether I want to match them or not: collection/col1 // MATCH collection/col2 // FAIL collection/col1/products/pro1 // FAIL My criteria: * One single regex (cannot be multiple expressions) * I have a list of "col"s to fail on. For example, I do not want to match if specifically "col2" or "col3" are in the URL * Aside from col2 or col3, i can have any col[#] in the URL * Even …

Member Avatar
Member Avatar
+0 forum 4

I have to print some text to printer. I needed to translate that text in Urdu language also. For that I used google translation API and all was set. But I am facing problem in order of output. // this is the code which is giving my desired output String text = "Honda head light large size" String translatedText = GoogleTranslate.translate("ur", text); String myString = "Saboor" String printString = String.format("%-15s %-15s %-10s",text,translatedText,myString); graphics.drawString(printString,x,y) //Above code is giving me correct output as following Honda head light large size urdu translation Saboor // Now pasting the code which create problem: String text …

Member Avatar
Member Avatar
+0 forum 1

Guys, Ive gotten it into my head to do somthing fairly difficult for me, I want to communicate with a swing application, to a proximetly sensor, and track live when it senses somthing and how many times it has sensed somthing, I want to use java. theres alot more to it than this, eventually connect a multitude of sensors, temperture, photo eyes, etc, I want to recieve these signals wirlessly as i want to see it on my office computer, and the sensors with be in another room, How would I get started with this? Treat me like a noob, …

Member Avatar
Member Avatar
+0 forum 3

hello there. i needed a little help in writing coding for reading multiple lines of data from a .txt file that are seperated by commas. Student Name, Student ID, Mark Ada Lovelace , S001 , 99 Barbara Liskov , S0123 , 44 Carol Shaw, S0023 , 55 Donna Dubinsky , S8333 , 33 Shafi Goldwasser , S934 , 77 Sophie Wilson , S11813 , 22 Frances Elizabeth Allen , S8254 , 66 After reading the data, the data has to be graded and sorted by name, id and grade. i would very much appreciate your guys help in this

Member Avatar
Member Avatar
+0 forum 7

I am a drafter using autocad and I know a littttttle bit of VB6. We just happen to have it installed on our computers and I wanted to create an application that can do this: 1. Takes the # input from text1 and text2 and waits for the user to hit "Ok" (command click) 2. Upon clicking, the information from Text2 gets multiplied by 0.75, and the total sum is then compared to Text1 with a less than or equals to equation. 3. the comparison then Decides if the sendkeys will say "G152B" or "CB152B" to Notepad Without words i …

Member Avatar
Member Avatar
+0 forum 2

The following is the correct way to do encryption. I thought it useful to post for various reasons, most particular being the necessity for our companies to have good security controls. This is very important. If anybody has any other good snippets feel free to post. The user class is a little verbose, but you should be able to clearly see the hash algorithim which is essentially non reversable by anything other than a password crack. That is a HashAlgorithim. In order to create things you can decode you should use a SymmetricAlgorithim. Passwords should always be HashAlgorithims due to …

Member Avatar
Member Avatar
+0 forum 9

Here I present a WebSite containing just Default.aspx. Current snippet code has to do with coloring text in an input field of a web page. The input field is an editable DIV HTML element. While the user writes, there is a partial post (an XMLHttpRequest) to the server. Then the code behind decides which parts of the input should be colored and which color should it be, and returns back to the client the input already formatted with color(s). The code behind must be as fast as possible to interfere as less as possible the user input. After the formatted …

Member Avatar
+0 forum 0

Hi guys! i think this is usefull, a lot of the users have problems with .Net Framework installation, Error code: HRESULT 0xc8000222 Do these to solve: a: Click Start > Run. b: Type cmd and press Enter. Please run the following command in the opened window. net stop WuAuServ c: Click Start > Run Type %windir% and press Enter. d: In the opened folder, rename the folder SoftwareDistribution to SDold. e: Click Start> Run type cmd and press Enter. Please run the following command in the opened window.. net start WuAuServ Hope this information helps.

Member Avatar
+0 forum 0

Dear Friends, Good Day, I am facing an issue in one of the functions the code is given below if someone can help on this actually this function is supposed to check the work ordewr number if it's nulll then it is suppose to take default value as 4999 and add one everytime, but the function is not taking the default value its is starting from 1 and then next record +1 means 2 like this but it supposed to be like 4999+1 means 5000 next record 5000+1 means 5001 like this. Any help in this regard will be highly …

Member Avatar
Member Avatar
+0 forum 4

There are a number of very old threads on CUDA so I'm starting a new one rather than resurrecting an old one. Does anyone here have any experience setting up and developing in CUDA on a Windows platform? I know that there is a system that can be set up with Visual Studio/CUDA that uses the nvidia hardware but I am hoping to find something for AMD/Radeon. I have found something called [ocelot](https://code.google.com/archive/p/gpuocelot/) that supposedly works with AMD/Radeon (which I have on my laptop) but there are issues: 1. It has the smell of abandonment (hasn't been updated since 2013) …

Member Avatar
Member Avatar
+0 forum 11

The End.