Postări

Se afișează postări cu eticheta Programming

Links !

Matematica: https://www.cymath.com Coding game: https://www.codingame.com/start https://codefights.com/

JAVA SETUP 2

Imagine
LINUX Toate fisierele de tip tar, tar.gz/bz etc se deschid apasand dublu click pe ele si apoi drag&drop sau apasand butonul extract 1. Install VirtualBox de aici   pe parcursul instalarii o sa ceara sa accepti si sa ai incredere in Oracle ... bifeaza da si ok. 2. Creaza o masina virtuala Linux pe 64 de biti 3. Pasii din poze create an existing hard disk now dinamically allocated ultimul pas este sa adaugam imaginea cu linux mint pe care o descarcam de aici Acum pornim masina virtuala de la butonul START 4. Instalare linux mint - pe desktopul masinii virtuale exista un shortcut cu instalarea lui linux mint urmam pasii si instalam sistemul de operare la sfarsit atunci cand va fi cazul vom bifa pe parcurrsul instalarii enable 3rd party software download si vom defini un username/parola + autologhin ! enter la sfarsitul instalarii pentru ca masina virtuala sa reporneasca sistemul de operare 5. in interiorul sistemului instalat ...

JAVA SETUP

Imagine
Windows: 1. JAVA - JDK - download de aici  varianta pe 32/64 bites aferenta sistemului de operare (pentru a afla ce sistem de operare rulati Control Panel\System and Security\System direct in explorer) Din cauza ca java se adauga singura prin installer la %path% nu este nevoie sa intervenim 2. MAVEN -  download de aici  dezarhivati intr-un director convenabil deschideti command prompt (tasta windows + cmd + enter)  apoi in terminal copy paste(shift + insert) rundll32 sysdm.cpl,EditEnvironmentVariables ar trebui sa vedeti ceva asemanator in partea de sus adaugati o variabila denumita MVN impreuna cu calea completa Ex: C:\Users\Alex\Download\JAVA1\apache-maven-3.5.2 in partea de jos cautati variabila path si la sfarsitul sirului adaugati ;  dupa care %MVN%\bin in terminal (windows + comanda cmd) echo %path% si ar trebui sa vedeti la sfarsit calea completa catre directorul bin daca totul a decurs bine mvn -version ar trebui sa va intoarca v...

Java SpringBoot different properties file dev/test/production

Imagine
In order to make Spring java -jar have to take different application.properties at launch time based on whatever you specify {dev/test/production} simply do this: java -jar { MyAwesomneJar } --spring.config.location={ path }/ application.properties Where {path} is the dev, test or production folder where the  application.properties file is contained.

Fast POCO Class direct from SQL Management Studio

Create fast POCO class from SqlServer with this. Sweet! declare @TableName sysname = 'MyTableName' declare @Result varchar(max) = 'public class ' + @TableName + ' {' select @Result = @Result + '     public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } ' from (     select         replace(col.name, ' ', '_') ColumnName,         column_id ColumnId,         case typ.name             when 'bigint' then 'long'             when 'binary' then 'byte[]'             when 'bit' then 'bool'             when 'char' then 'string'             when 'date' then 'DateTime'             when 'datetime' then 'DateTime'             when 'datetime2' then 'DateTime'          ...

Logging part I

Welcome to logging part I Recently I had a nasty error in production on an asp.net web site application that gave me an error only on one page :) So because this was on production and I was in a very big harry I had to do something fast. The only thing I could think of was to add on the fly ( because it is a web site project each page was compiled at access time - yes the project did not have a global error handler - we'll get there ) I added on the page this: void Page_Error(object sender, EventArgs e) { System.IO.File.WriteAllText(@"C:\Dev\ErrorLog.txt", Server.GetLastError().ToString()); } On the next publish (web site) just put the Global.asax file in the project either add the file with File / Add New and search global application in search and chose Global.asax file. In the appropriate Application_Error section say: public static void InsertText ( string path , string newText ) { if ( File . Exists ( path )) { st...

Asp.net TextBox - placeholder I

For sure You wanted to put a placeholder inside a textbox in asp.net and it is quite simple all you have to do is say:  placeholder="enter the text here"  inside the textbox tag like so: In the next version of this post I will show how to add the placeholder tag in an extended textbox control.

Creating date time picker control for asp.net

Imagine
This is a very simple control to create and to have with very cool results. Create a user control and just paste in the code: Code snipet: ASCX: < link href ="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel ="stylesheet"> < link rel ="stylesheet" type ="text/css" media ="screen" href ="//tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css"> <% -- -- %> < script type ="text/javascript" src ="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"></ script > < script type ="text/javascript" src ="//tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min.js"></ script > < script type ="text/javascript" src ="//tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-date...

DevExpress Theme Changer ...

Original post here !  (backup purpose only) Devexpress theme changer using My.Settings to save it. 1.)Make a new form, name it whatever you would like. 2.)Reference Devexpress.BonusSkins.dll and Devexpress.OfficeSkins.dll 3.)Go to My.Settings and make a new setting with the name "Theme" with the value "Sharp" 4.)Go to your forms Designer. vb  and change the "Inherits" to DevExpress.XtraEditors.XtraForm 5.)Add 1 Button to your form and 1 ListBoxControl. Make the Text of the button "Change Theme", Make your ListBoxControl items these: Code: Caramel Money Twins Lilian The Asphalt World iMaginary Black Blue Coffee Liquid Sky London Liquid Sky Glass Oceans Stardust Xmas 2008 Blue Valentine McSkin Summer 2008 Pumpkin Dark Side Springtime Darkroom Foggy High Contrast Seven Seven Classic Sharp Sharp Plus DevExpress Style Office 2007 Blue Office 2007 Black Office 2007 Silver Office 2007 Green Office 2007 Pink Office 2010 Blue Office 2010 Black Offi...