[[Depths (Made with Processing)](https://www.ktbyte.com/projects/project/94051/depths?ref=20181210daniweb)](null)

Member Avatar
+1 forum 0

heres my actual code for find\search a folder: string FindDirectory(std::string FindDirectoryName[2], std::string StartDirectory="C:") { WIN32_FIND_DATA file={0}; string str=StartDirectory+ "\\*"; HANDLE search_handle = FindFirstFile(str.c_str(), &file); static bool blnFindDirectoryName=false; static string strFolderName =""; //testing if the folder is valid: if (search_handle != INVALID_HANDLE_VALUE) { do { //if the folder was founded, then break the loop: if(strFolderName!="") break; //for avoid files names and the folders "." and "..": if ((file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && strcmp(file.cFileName, "..") && strcmp(file.cFileName, ".")) { //cout <<StartDirectory + "\\" + file.cFileName << endl; //testing if the folder was found //and add it on static strFolderName if(string(file.cFileName)==FindDirectoryName[0] && blnFindDirectoryName==false) { …

Member Avatar
Member Avatar
+1 forum 4

Hi guys, This is my first post and so glad to start sharing the knowledge. I am using Mysql database with VB.NET and I have this code : Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim str As String = "Server=localhost;Port=3306;Database=testdb;Uid=root;Pwd=password" Using con As New MySqlConnection(str) Dim query As String = "select * from testdata where rfid_tag='" & TextBox3.Text & "' and Date_serve<= '" & Date.Now.ToString("yyyy-MM-dd ") & "' and Start_Time<= '" & Date.Now.ToString("HH:mm:ss ") & "' and End_Time>= '" & Date.Now.ToString("HH:mm:ss ") & "' or amount_serve='' " Dim cm As New MySqlCommand(query, con) con.Open() Dim rd …

Member Avatar
Member Avatar
+1 forum 2

I am trying to replace a string in a function with double pointers. I would like to see this change back in main. What am I doing wrong? These are the warnings my compiler gave me. $ gcc *.c -Wall main.c: In function ‘replacevalue’: main.c:10:12: warning: passing argument 1 of ‘strcpy’ makes pointer from integer without a cast [-Wint-conversion] strcpy(**pinput1, string); ^ In file included from main.c:4:0: /usr/include/string.h:38:8: note: expected ‘char * restrict’ but argument is of type ‘char’ char *strcpy (char *__restrict, const char *__restrict); ^~~~~~ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> void replacevalue(char **pinput1) { char …

Member Avatar
Member Avatar
+0 forum 1

I am doing a team project with some people that prefer Linux and some people prefer Windows. We are also not allowed to share code for security reasons. One thing the Windows people love to whine about is a way to hold the window open. So the way they usually solve the problem is with: #include <conio.h> getch(); This creates a problem for the Linux users since we do not have that library. I have been looking for ways to solve this problem and I really like this idea. https://www.dreamincode.net/forums/topic/30581-holding-the-execution-window-open/page__st__30__p__575874&#entry575874 #include <stdlib.h> //For system commands //Detect and define which command …

Member Avatar
Member Avatar
+0 forum 2

Hello Daniweb Community, I have been talking on a couple [Facebook](http://www.facebook.com) groups such as sale pages where you post your own stuff for people to buy. Most groups like this have rules about bumping like once per day, every 12 hours etc... So it got to the point where it became annoying to have to bump my posts every so oftern so I managed to construct this script that'll do it automatically with the help of a cronjob that can be set to bump at whatever time you like. So I have made a simple easy to use (ha may …

Member Avatar
Member Avatar
+3 forum 29

I am on the latest version of Windows 10, running with SWI-Prolog 7.6.4, and trying to get JPL (Java <->Prolog) running for a school project. I've not had to deal with path issues much but I have done my best to understand the problem. I've added the necessary import statements to my java class file, and the necessary environment variables to my system as per the page here: https://jpl7.org/DeploymentWindows However it *still* does not show up as a valid java package. I've just realized as I write this that maybe I need to reboot. I will try that after posting …

Member Avatar
Member Avatar
+1 forum 3

So I'm trying to create a UI that allows multiple buttons in the same window. All of the are toggles to control GPIO outputs to control relays. I've managed to get them to all work individually in their own files, but when put into the same file is all on or all off. There is only 4 toggles for now, as a demonstration for my boss, but there will be many more on the final product.` Below is the code I've come up with so far. (keep in mind I only started learning Python and coding in general yesterday) I'm …

Member Avatar
Member Avatar
+1 forum 4

**HELLO GUYS!** I'm Sergey Romanenko a web-developer with strong will for learning and researching new technologies and architectural solutions. I like creating and using specialised tools for making development processes as efficient as possible. Let me introduce my pet project - Flextype! Flextype is Open Source, fast and flexible file-based Content Management System. That's Easy to install, upgrade and use. Flextype provides amazing API's for plugins, themes and core developers! **FEATURES** Simple Easy to install, upgrade and use. No installation needed, just copy files to your server! Fast Flextype is realy fast and lightweight! No database required, flat files only! …

Member Avatar
+1 forum 0

What's the difference between LCASE() and LOWER() in MySQL? I found places on the web that said they're similar but not a synonym for each other, so I'm not sure what the differences are?

Member Avatar
Member Avatar
+0 forum 1

I am traying to filter Datagrid view based on user type in TbxGlCode (TextBox) Initialy Datatable is populated from SQL table to TempTable (DataTable) getting error at **runtime** at below line Dim Rows As DataRow() = TempTable.[Select]("Code like '%" & VerCode & "%'") Exception Unhandled **System.Data.EvaluateException: 'Cannot perform 'Like' operation on System.Int32 and System.String** How to filter datatable with** Like ** option *My Code* Dim TempTable As DataTable Private Sub FrmGLCodeList_Load(sender As Object, e As EventArgs) Handles MyBase.Load ' Dim TempTable As DataTable 'Create New Table Instance TempTable = New DataTable TempTable.Columns.Add("Code", GetType(Integer)) TempTable.Columns.Add("Name", GetType(String)) 'Adding Rows to TempTable from …

Member Avatar
Member Avatar
+0 forum 5

hi I have datagridview which i want to add on several forms. Number of columons and all ather functionality remains the same. to avoid creating size, columns, column names each time, i am trying to create class control for datagridview which will give me by default number of columns and size once i add the datagrid to form. i have tried this . **But it shows ten columns instead of five** . attached picture Public Class ClsDgvJournal Inherits DataGridView Public Sub New() Width = 500 Height = 200 Dim Col1 = New DataGridViewTextBoxColumn With {.HeaderText = "AAA", .Name = "A", …

Member Avatar
Member Avatar
+0 forum 10

Hello, Recently I am using phpexcel and afer many tries I wasn't able to find out how to make a document with a image in its header. Here is a simplified code that I am using. Can someone helps me with this issue?! <?php require_once 'PHPExcel.php'; $objPHPExcel = new PHPExcel(); $objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing(); $objDrawing->setPath('header.jpg'); $objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_RIGHT); $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader("&C&G"); $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('A1', 'CODICE PRATICA'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); $objWriter->save('test.xlsx'); ?>

Member Avatar
Member Avatar
+0 forum 3

Pretty neat text-based RPG that I made. Currently my first game.

Member Avatar
Member Avatar
+0 forum 18

Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function?

Member Avatar
Member Avatar
+1 forum 7

hi all, I am new to Codeigniter, start learning because of one of our customer want the conversion of their some Oracle Forms to web app and I found it is much easier to use CI framework of PHP but one thing I can't connect / work with their Oracle database 12c Release 2. I have a VM with Win 8, Oracle DB 12c and WAMP ( latest downloaded on 10-Nov-2018 ). I searched for it and found various solution (not any of 12c), tried some but still I failed to even load data from a table. can somebody help …

Member Avatar
Member Avatar
+1 forum 6

I have a JSON array that has multidimensions to it: { "@id": "a", "@label": "A", "drecord": [ { "@id": "aaliyah", "@rdate": "2001-08-25", "@lease": "bh05", "name": { "surname": "Aaliyah" }, "job": "hip hop singer/actress", "dead": { "@value": "y" }, "cause": "Burned to death in a plane crash", "ddate": { "date": "2001-08-25" }, "bdate": { "date": "1979-01-16" }, "other": { "#text": [ "Full name: Aaliyah Dana Haughton, was to have appeared in the second and third", "movies." ], "movie": "Matrix", "home": { "@id": "http://www.aaliyahEbertonline.com/" }, "imdb": { "@id": "Aaliyah" }, "fg": { "@id": "5727911" } } }, and i am trying to …

Member Avatar
Member Avatar
+0 forum 1

I'm using Gambas as my language.. :-) Now I have a problem getting some values from an XML document. I'm using xml.gb as my "plugin". The XML document is: "<ns1:Event> <ns1:Number>1</ns1:Number> <ns1:Name>Home Team - Away Team</ns1:Name> <ns1:Status Id="100">End</ns1:Status> <ns1:Results> <ns1:Result Id="0" Name="Result">2</ns1:Result> <ns1:Result Id="1" Name="Fulltime">2</ns1:Result> <ns1:Result Id="2" Name="Halftime">0</ns1:Result> </ns1:Results> </ns1:Event>" My code so far is: Dim i As Integer Dim iKampnr As Integer Dim iRes As New Integer[] Dim hXMLDocument As XmlDocument Dim xeElements As XmlElement[] Dim tempElements As XmlElement[] Dim xeNode As XmlNode[] Dim xsRecord As String[] Dim sSplit As New String[] Dim yData As New XMLNT Dim rData …

Member Avatar
Member Avatar
+0 forum 6

I have a form that uploads a news article with it's picture and then stores all the info correctly. I am using codeigniter with Active Record and would like to know how to display the image with the post it was uploaded with. here is my upload script: public function create(){ $data = array('error' => ''); $config = array( 'upload_path' => './uploads', 'allowed_types' => 'gif|jpg|png', 'max_size' => '204800', 'max_width' => '1920', 'max_height' => '1080', 'encrypt_name' => true ); $this->load->library('upload', $config); if(!$this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $data['title'] = 'Create a news item'; $data['main_content'] = 'news/create'; $this->load->view('templates/template', $data, $error); } …

Member Avatar
Member Avatar
+0 forum 4

I need to create a class that represents one crayon of a particular color and height(length). Then, I need to design an applet that lets me draw a box of different colored crayons. This is what I have so far: **CLASS:** import java.awt.*; public class Crayon { private final int BOTTOM = 150; private final int WIDTH = 25; private Color color; private int length, location; //---------------------------------------------------------------------------------------------- // Crayon's characteristics. //---------------------------------------------------------------------------------------------- public Crayon (Color color, int length, int position) { color = color; length = length; location = position; } //---------------------------------------------------------------------------------------------- // Draws crayon. //---------------------------------------------------------------------------------------------- public void draw (Graphics page) …

Member Avatar
Member Avatar
+0 forum 5

hi, i am trying to read from a text file and store the data in an array but i don't know how to get started with my code. can someone please get me started here. i have start with the code for locating the file, but i am having difficulty reading the file. Dim strFileName As String OpenAnswerFile.ShowDialog() strFileName = OpenAnswerFile.FileName MessageBox.Show(strFileName) 'message box showing the file path

Member Avatar
Member Avatar
+0 forum 13

Hello! I am interested in the issue of protecting the code from hacking. Do you protect your code from decompiling and hacking? Why did the question arise? I worked in a team that developed games for Android. They all used obfuscators! So almost no one could hack their application. Now I am interested in the topic of code protection. I looked at the existing topics, they are slightly outdated (8-10 years ago were relevant). Use / not use obfuscator? Which to choose?

Member Avatar
Member Avatar
+1 forum 14

i'm trying to make price lable printer and i was able to print a single page for a single id, but my problem is when i'm trying to print more that one id i was not able to make it work, i'm still learning but i was hoping that someone can give me idea how to make it work Imports MySql.Data.MySqlClient Public Module thisModule 'Info for the Price Lable Public NameV As String Public IdV As String Public DiscV As String Public ArDiscV As String Public PriceV As String Public SalesPriceV As String End Module Public Class Form1 Dim connection …

Member Avatar
Member Avatar
+1 forum 3

First program is adding a new topic on forum second program reprtesents a form where we can fill data. so it will showing error undefined index conent and topic and the data is not inserted in my database please help me

Member Avatar
Member Avatar
+1 forum 2

Is there any method in java to generate random number (integer, byte or float) ? Please tell me if any i need it in my program. If possible please give full example. Thanks!

Member Avatar
Member Avatar
+0 forum 1

The challenge I need to resolve is getting a sub-string from strings such as those below. Each line is of an array so I am iterating and working on one line at a time in a JavaScript loop. All of the strings have the names at the start of the line: Joe Smith will run... Jane Jones will follow... Bridget Burns and Jack Jones will be away... Jack Jones, Gracie Burns and George Burns have three days in... The sub-string I need is the name(s) at the start of each string. My JavaScript is handling an example of the first …

Member Avatar
Member Avatar
+0 forum 7

$query = "INSERT INTO 'user-profiles' ('name', 'avatar', 'description', 'votes', 'pay_methods', 'location', 'user_id') VALUES ('sadj', 'qwesad', 'sadqwdqw', '0','sadsad', 'sadasdsad''4')"; $resultprof = $this -> conn -> query($query); votes and user_id are INT columns, and user_id is a foreign key. Making this insert on mySQL directly it works perfectly, but on my PHP the "success" is false....

Member Avatar
Member Avatar
+0 forum 5

I need help with implementing MySQL transactions with PHP. Specifically, I'm confused between the flags `WITH CONSISTENT SNAPSHOT`, `READ WRITE`, and `READ ONLY`, what their differences are, and how they relate to table locking. I already read the MySQL reference manual but I'm still confused.

Member Avatar
Member Avatar
+2 forum 6

Above program takes input of coefficient and power separately of 2 different polynomials add them up to a new polynomial.It is successfully compiled and executed in DEV CPP as C file.It Turbo C compiler add void before main function to avoid warning messages.

Member Avatar
Member Avatar
-1 forum 7

I am a novice at JavaScript an jQuery. I am writing a project and trying to incorporate $(this) to read a data attribute. Once the data attribute is determined and assigned to a variable, I intend to use that to access other form elements. Instead of reading the data attribute as intended, clicking the button is submitting the form. This is a code sample: <fieldset class="new_inputs" id="new_inputs1"> <label for="file_input_1">Input File:1</label> <input class="fileRenamingFormInput" name="file_input_1" id="file_input_1" type="text" value=""> <br> <select class="fileRenamingFormSelect" name="destinationFile_1 id="destinationfile_1">...</select> <input class="fileRenamingFormFileOut" name="file_out_1" id="file_out_1" type="text" value=""> <br> <textarea class="copyCommandBlock" name="copyCommandBlock1" id="copyCommandBlock1"></textarea> <button type="submit" class="btnGenerate" id="btnGenerate1" data-idx="1">Generate command</button> <- Button …

Member Avatar
Member Avatar
+1 forum 12

The End.