Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

Gilbert Consellado

@Gilbert Consellado
About
Posts
103
Topics
27
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • OOPKSC - Out Of Place Keyboard Shortcuts
    G Gilbert Consellado

    The "hjkl" for navigation and "\" for searching CTRL+G as well :-D

    The Lounge visual-studio csharp question

  • I need advice on storing application level encrypted data.
    G Gilbert Consellado

    I just want to ask, what is your solution on storing encrypted data on database? And also how you do searching on it? For now the subject database server is mysql. Disk level encryption is not an option. I also research about database level encryption but, MySql TDE is not for me, and also if you migrate to other database server in my understanding you need to re-encrypt all the data. So my last bet is application level encryption. And I tried to implement it using AES-GCM, but on this I will lose database searching, because encrypting the same data with the same key and id will produce different results. Now I got an idea but, i don't know what would be the risk implementing it. I was thinking blind indexing. What I am planning to do is to store 2 version of the encrypted data. first the data will be encrypted with aes-gcm, then store another version of it using one-way encryption on this same data will produce the same hash. So the first encryption is reversible but not searchable, while the second one is not reversible but I can do whole word searching. The obvious drawback of this is speed. But I want also to ask if in security perspective is it feasible? And also how do you do a search query on encrypted database using the partial text of the data? Thank you

    Database database security question mysql sysadmin

  • Simple Internet Security
    G Gilbert Consellado

    I will recommend K9 Web Protection from bluecoat. It's easy to setup and tested on my case and its free for personal use.

    The Lounge security question

  • How to sync two or more collocation database server?
    G Gilbert Consellado

    Thanks. A very nice concept, I definitely want to try that.

    Database database tutorial mobile mysql sysadmin

  • How to sync two or more collocation database server?
    G Gilbert Consellado

    I can't tell if mysql clustering could be a solution(I am thinking about galera or xtradb clustering). But my biggest problem is about the unstable internet connection. Actually it is planned as multi-tenant setup with a single online mysql server and the tenant is separated by schema, and a tenant can also have their own local database on their location. But I want to solve this problem first. For example I have a tenant, but this tenant has a multiple collocation, and want to sync the data on every location and also on the online server. They can read/write on the first, second, etc collocation server using a desktop app(respective to their location) and they can also read/write on the online server using a mobile app. Now my problem is how could I sync them, when internet is available? So data written and updated on the first location will propagate to other server, on the online server on the second server and so on, and vice-versa. P.S. Data deletion will be soft-delete. Thanks.

    Database database tutorial mobile mysql sysadmin

  • what is the best way indexing foreign key from multiple table?
    G Gilbert Consellado

    Thanks appreciated :) .

    Database question database

  • what is the best way indexing foreign key from multiple table?
    G Gilbert Consellado

    For now its just a concept table, for me to understand when to use the first or the second one. can you explain to me when should I use the composite index or the other one? please. Thanks base on your reply your saying that, if I use the t1_id and t2_id to satisfy a where clause frequently, I should use the composite key other wise I should use the separate index for every field. Am I right? How about joining the three tables? Thanks.

    Database question database

  • what is the best way indexing foreign key from multiple table?
    G Gilbert Consellado

    What is the better way of indexing the foreign key?

    Create Table table3(
    t3_id int not null auto_increment,
    t1_id int not null,
    t2_id int not null,
    primary key (t3_id),
    index IX_index (t1_id, t2_id), // this is my concern
    constraint FK_t1 foreign key (t1_id)
    reference table1(t1_id),
    constraint FK_t2 foreign key (t2_id)
    reference table2(t2_id));

    or

    Create Table table3(
    t3_id int not null auto_increment,
    t1_id int not null,
    t2_id int not null,
    primary key (t3_id),
    index IX_t1 (t1_id), //this is my concern
    index IX_t2 (t2_id), //and this
    constraint FK_t1 foreign key (t1_id)
    reference table1(t1_id),
    constraint FK_t2 foreign key (t2_id)
    reference table2(t2_id));

    This is for innodb tables, I dont have a broad understanding how the btree works. But as far as I know, the first table will save the indexes on single area while the second is not (correct me if I am wrong). And if it is what is the pros and cons if I will put it on a single index or multiple index? Thanks.

    Database question database

  • no parameterless constructor defined for this object
    G Gilbert Consellado

    Thanks, yeah it seems to work this way. But marking it internal will give the same error. Actually I use XtraReport a third party component it has SaveLayout and FromStream member. But i just decide to remove the constructor parameter and just pass the value through a property. P.S. Whooo my ISP giving me crap right now.

    C# question help

  • no parameterless constructor defined for this object
    G Gilbert Consellado

    Got it. :-D But i just decide to remove the parameter and just expose the property setter of one of its member, because it also introduce other code problem. btw, thanks

    C# question help

  • no parameterless constructor defined for this object
    G Gilbert Consellado

    hmmm, honestly I didn't know how to reply to this. It bothers me for a while. I apology, but are you serious with that code snippet or you just give me a sarcastic reply? ;) P.S. I didn't post the the whole code on may sample to make the post short.

    C# question help

  • no parameterless constructor defined for this object
    G Gilbert Consellado

    Sorry, I think i didn't deliver my post right. The first example, that is the old code, and I already remove that. Actually the current code is something like this:

    var classObject = new ClassObject(parameterValue);
    dictionary.Add(id, new MemoryStream());
    ///then add the object stream here to the created storage on the dictionary

    Then I retrieve it like this.

    var retriveObject = dictionary[id] as ClassObject; //The runtime error while happen here

    Thanks

    C# question help

  • no parameterless constructor defined for this object
    G Gilbert Consellado

    I have a class that has no parameters then i will create an object of it and convert it to stream and store it into a dictionary, every thing is fine until i add parameter to the class. basically i do this.

    var classObject = new ClassObject();
    dictionary.Add(id, new MemoryStream());
    ///then add the object stream here to the created storage on the dictioary

    then i will just retrieve it like this.

    var retriveObject = dictionary[id] as ClassObject;

    Now I add a single parameter on that class now using the last code above will produce

    Quote:

    no parameterless constructor defined for this object

    my question, is there way to fix the exception without removing the parameter i added to the class? Thanks

    C# question help

  • Initiate properties at the creation of the object.
    G Gilbert Consellado

    I know that the code snippet below is equal, but which is better?

    Sample sm = new Sample()
    {
    prop1 = 1,
    prop2 = 2
    };

    and

    Sample sm = new Sample();
    sm.prop1 = 1;
    sm.prop2 = 2;

    Is there any advantage and disadvantage on both of them? what's your thought about this? thanks

    C# question

  • robocopy with environment variable on task scheduler return 0x10
    G Gilbert Consellado

    I tried to copy files using robocopy but if i tried to append date and time to the folder name it will result to 0x10

    %DATE:/=-% %time::=-%

    the above code is the cause of the problem but it does run on cmd without any issue This is the complete sample action

    robocopy /mir /copy:DAT /mot:30 "D:\Source File\file" "E:\Target Directory\backup %DATE:/=-% %time::=-%" /xd "D:\Source File\file\excluded"

    any idea how i can fix this Thanks

    System Admin help workspace

  • killing processes on mysql
    G Gilbert Consellado

    I am do dumb to to write this and didn't figure it out quickly

    SET @f_p = find_process;

    :wtf: BTW it is working now

    Database database mysql help

  • killing processes on mysql
    G Gilbert Consellado

    anyone please :(

    Database database mysql help

  • killing processes on mysql
    G Gilbert Consellado

    i created an event on one of my db to kill process using root as the definer.

    DELIMITER $$
    CREATE DEFINER='root'@'localhost' EVENT `db`.`kill_processes`

    ON SCHEDULE EVERY 5 SECOND
    ENABLE
    DO
    BEGIN
    DECLARE process_to_kill VARCHAR(25);
    DECLARE done BOOLEAN DEFAULT FALSE;
    DECLARE find_process CURSOR FOR
    SELECT CONCAT('KILL ', `ID`, ';') FROM `information_schema`.`PROCESSLIST`
    WHERE `information_schema`.`PROCESSLIST`.`USER` = 'some_user' AND
    `information_schema`.`PROCESSLIST`.`COMMAND` = 'Sleep' AND
    `information_schema`.`PROCESSLIST`.`TIME` > 90;

        DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
        
        OPEN find\_process;
        
        loop\_process : LOOP
    	FETCH find\_process INTO process\_to\_kill;
    	
    	IF done THEN
    		CLOSE find\_process;
    		LEAVE loop\_process;
    	END IF;
    	
    	SET @f\_p = find\_process;
    	PREPARE stmt FROM @f\_p;
    	EXECUTE stmt;
    	DEALLOCATE PREPARE stmt;
    	
        END LOOP loop\_process;
    END$$
    

    DELIMITER ;

    but unfortunately it is not working, the event is executing every 5 seconds but it doesnt kill any process that is runnig more than 90 seconds. any help will be appreciated. thanks

    Database database mysql help

  • does MethodInvoker will not work on win XP?
    G Gilbert Consellado

    Yeah i just want to execute it asynchronously, but i was end up using synchronous if it detects that the OS is XP. BTW Thanks

    C# performance question

  • does MethodInvoker will not work on win XP?
    G Gilbert Consellado

    Thanks for the advice, but I was end up not using asynchronous method execution if the OS is windows XP, :( it is hard to deal with some user that cant get over to their OS's and hardware.

    C# performance question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups