Their the badgers... thanks guys.

Is there any way I can delete these Drafts myself, or is this a request to the MODs?

Oh my god... I must be smoking crack... Somehow I always thought this was the bottom of the page

1.png

But look, there's even more BWahahahaha...

2.png

I swear to god I've never seen that bit what the hell man... look there's a little JC badge too whoop... I must of just assumed the dim gray box was the footer and stopped scrolling automatically. GOSH DARN IT.

Re-Write blowfish for .Net:1
Navigate Web Browser:0

Hi Dani, thanks, I managed to get help understanding that. What I am really trying to find is the following. Once I've clicked on "publish" i Get this screen with the link at the top "View Article Workshop"

T1.png

Then when I click on the link I get the list of pending and draft articles:

T2.png

as you designed and built the website you'll be all to familiar with this =0) however, my question really is, once I've left this page, how do I get back to this Article Workshop View list, If I save a draft I can't seem to figure out how to get back to it at a later date... also, like here I've created a bunch of tests... which would be kind of cool if I could just click on a littel trashcan or something to delete them.

First of all I'd like to say great work on the addition of drafting articles before commiting to editorial however one question. The last two samples I published (Removed tick from "This is a working draft") seems to make the pending article unaccessible, I recently found out that the articles had been submitted for checking which is cool, however I couldn't find them any where, to get access to these articles I had to create a new article, then save as draft wich gave me access to a list of draft and pending publishing articles.

Is there a way to access this Draft\Pending list to re-edit at a later date, if so where it it. I think the link i saw was something like "upcoming articles"

Thanks.

Also, GoTo exits the loop meaning the conditions within that particular loop will only ever be true once. I can see that this is in another loop but it's not clear from here what for.

Wow, I didn't know GoTo was still valid, please stop that.

Well first of all, the flow of this entire operation is a little shaky, however looking at this:

                If LVProduct.Items(w).SubItems(4).Text = LVProduct.Items(w).SubItems(5).Text Then
                    GoTo Here
                End If
                If LVProduct.Items(w).SubItems(4).Text = LVProduct.Items(w).SubItems(5).Text Then
                    GoTo there
                End If

Both conditions are exactly the same so if the conditions are correct it will always goto Here, and never there.

in fact GoTo there will never be called, Here seems to be where your Whole sale stuff is... Wholesale is always going to be called if the above conditions are correct.

Also not understanding what your check boxes are doing and when, there is a chance when you GoTo Here, there's code will be executed afterwards.

Bugger. That's beyond my knowledge I'm afraid. Maybe you could post that response in web development and ask about security within iFrames. I think the VB side is ok.

Ok, this is going to hit every <a> tag in the iframe with invoke onclick, but give it a shot

 Dim theElementCollection3 As Windows.Forms.HtmlElementCollection

 'This line now includes access to the iFrame document.
 theElementCollection3 = WebBrowser1.Document.Window.Frames(0).Document.GetElementsByTagName("a")

 For Each Element As HtmlElement In theElementCollection3
     Element.InvokeMember("onClick")
 Next

if there's more than one frame try changing the Frames(0) to another index. if the index is wrong you will get an error.

I got this to work on a quick demo I made here.

http://software.solvoterra.com/example2.html

example2.html has an iframe whose source is sameURL/example.html

If this is your own HTML source you can give the <a> tag an id. in this case "Test" then use the following code.

Dim theElementCollection3 As Windows.Forms.HtmlElement

theElementCollection3 = WebBrowser1.Document.GetElementById("Test")

theElementCollection3.InvokeMember("onClick")

The <a> tag looks like this

<a id="Test" href="javascript:void(0)" onClick="removeOverlayHTML()">
<img style="position:absolute;top:97px;left:290px;border:0;z-index:101;width:10px;height:10px" src="http://www.castup.tv/images/close_button.png" alt="x"/></a>

I'm not 100% but wouldn't you need to invoke the "onClick" member?

Just out of interest Xuexue. How did you end up doing this?

ddanbe has provided two great examples of reading the Excel sheets. And This Link directly from IBM shows you how to parse a DataTable into DB2 it's in C# but easy enough to translate.

Job Done =0)

Thanks Diafol. Just what I needed to know.

Hey guys. I'm writing myself an online toolbox (for my code snippets). I have a "Snippets" table. My question is this. Would you save the snippet source in a Text column or would you have the snippet saved to a text file and the Snippet entry would reference the file name?

e.g. Snippets or Snippets2

66d53b10f23ce24db08dffd799cf70e2

Could you not parse the spreadsheet via a DataTable first? SpreadSheet -> DataTable -> DB2

So am I right in assuming, you preferance is:

  • Delete Image Entry from Images
  • Check Image_Has_People for entries with the deleted idImage
    -- Delete Relevant Images
  • Check Image_Has_Event for entries with the deleted idImage
    -- Delete Relevant Images

or even

  • Check Image_Has_People for entries with the proposed deleted idImage
    -- Delete Relevant Images
  • Check Image_Has_Event for entries with the proposed deleted idImage
    -- Delete Relevant Images
  • Delete Image Entry from Images

2680a256fcbf10c900499c36825b3e55

In the above model I have an Images table which holds all the filenames relevant to the image. I have two relationship tables (Image_Has_People and Image_Has_Event). Both of these tables have an FK ImageID linked to the Image table's PK idImage. I'm wondering, if I set both relationship table's ImageID FK to On Delete Cascade, If I delete an entry in one of the relationship tables will that not also delete the image table entry too?

What would I need to do in order that when I delete an Image entry from the Image table it also removes relevant entries in the two relational tables but not vice-versa?

My Pleaseure.

If thae parsing fails, you wont have any results so trying to access MyResults.Results(0) will "result" in an error as a result object hasn't been added to the results list.

Ok, the first part of the structure is ok, so here's the Geometry bit:

The Complete Code Is At The End

In geometry you have a few properties, let's make a simple textified version:

-bounds
--northeast
---lat
---lng
--southwest
---lat
---lng
-location
--lat
--lng
-location_type
-viewport
--northeast
---lat
---lng
--southwest
---lat
---lng

From the above structure you can see there are a couple of properties, some of which the structure is repeated. so the base structure for geometry would have the following properties

bounds
location
location_type
viewport

viewport and bounds have the same sub properties

northeast
southwest

and those sub properties, as well as location have sub properties

lat
lng

so create a LatLong Object

Public Class LatLong
    Public Property lat As String
    Public Property lng As String
End Class

New we'll create a Coords object for northeast, southwest

Public Class Coords
    Public Property northeast As LatLong
    Public Property southwest As LatLong
End Class

and the actual GeometryData object

Public Class GeometryData
    Public Property bounds As Coords
    Public Property location As LatLong
    Public Property location_type As String
    Public Property viewport As Coords
End Class

Object Structure

So your complete structure now looks like this

Public Class MyResults
    Public Sub New()
        results = New List(Of Result)
    End Sub
    Public Property results As List(Of Result)
    Public Property status As String
End Class

Public Class Result

    Public Sub New()
        address_components = New List(Of AddressComponents)
        types = New List(Of String)
        geometry = New GeometryData
    End Sub
    Public Property address_components As List(Of AddressComponents) ...

Of course you can. Am I right in assuming that you've got a good idea of what's going on, you're just having difficulty in matching the structure? I'll keep my eyes on this thread and have a look into this whilst waiti9ng for your response.

Just out of interest, do you have your current effort available to post so I can also see if you're not to far away from your solution?

BAre with me, I'll have a play in the mean time.

You're welcome. I hoped it's helped.

Sorry, I'll try that again...

Looking at your provided JSON string it looks like the property name is long_name >"long_name" : "Sunderland"

for example, if you set your structure up correctly you would access it by the following

Dim Town as string = MyResults.results(0).address_components(1).long_name

If you have trouble with this I will be happy to provide you with further assistance.

to get you started you would begin with the follwoing structure

Your base class may look something like this:

Private class MyResults
     Public Sub New()
        results = New List(Of Result)
    End Sub
    Public property results As List(Of Result)
    Public property status As String
End Class

Your Result class may look like this

Private Class Result
    Public Sub New()
        address_components = New List(Of AddressComponents)
        types = New List(Of String)
        geometry = New GeometryData
    End Sub
    Public property address_components As List(Of AddressComponents)
    Public property formatted_address As String
    Public property geometry As GemoetryData
    Public property partial_match As Boolean
    Public property types As List(Of String)
End Class

Your AddressComponents object may look like this:

Private Class AddressComponents
    Public Sub New()
        types = New List(Of String)
    End Sub
    Public property long_name As String
    Public property short_name As String
    Public property types As List(Of String)
End Class

Do you see how you're building an object structure to match the structure of the JSON string. The geometry class would be a little more complicated, but the same principal.

Looking at your provided JSON string it looks like the property name is long_name >"long_name" : "Sunderland"

for example, if you set your structure up correctly you would access it by the following

Dim Town as string = results.address_components(1).long_name

If you have trouble with this I will be happy to provide you with further assistance.

to get you started you would begin with the follwoing structure

Your base class may look something like this:

Private class MyResults
    Public results As List(Of Results)
    Public status As String
End Class

Private Class Results

    Public address_components As List(Of AddressComponents)
    Public formatted_address As String
    Public geometry As objGemoetry

End Class

Your AddressComponent object may look like this:

Private Class AddressComponents
    Public long_name As String
    Public short_name As String
    Public types As List(Of String)
End Class

Do you see how you're building an object structure to match the structure of the JSON string. The geometry class would be a little more complicated, but the same principal.

I just don't get this one Jim, apart from a whole bunch of un-needed code... batoolhussain's, yours, and even:

        Dim pic As Bitmap = New Bitmap(PictureBox1.Image)
        Dim gray = New Bitmap(pic.Width, pic.Height)

        For x As Integer = 0 To (pic.Width) - 1
            For y As Integer = 0 To (pic.Height) - 1
                Dim c As Color = pic.GetPixel(x, y)
                Dim d As Integer = (CInt(c.R) + CInt(c.G) + CInt(c.B)) \ 3
                gray.SetPixel(x, y, Color.FromArgb(d, d, d))
            Next
        Next

        PictureBox2.Image = gray

Should all work. I can only assume there's a dodgy property somewhere?

There is no reason why this code shouldn't work. To speed things up a little move PictureBox2.Image = gray outside of the two for-next loops.

try creating a new form, with a picturebox (Change no properties) and the button. place the code in the button and load an image into the picture box's image property and try running again.

I've just copied and pasted your code into the above scenario and it works.

Though instead of typing out all those properties like that just for a couple of bits of data you may just want to structure your properties like this

Public Property bytes As Long
Public Property is_dir As Boolean

etc

Note The property name and the object structure has to match the JSON names and structure.

Have you tried parsing the JSON into an object structurte? here is a JSON string from a DropBox list files Query:

{"hash": "2e50103f8605f7639f7da0fd2e934fe4", "thumb_exists": false, "bytes": 0, "path": "/", "is_dir": true, "icon": "folder", "root": "app_folder", "contents": [{"rev": "5929d57df1", "thumb_exists": true, "path": "/flower.jpg", "is_dir": false, "client_mtime": "Mon, 15 Sep 2014 19:20:02 +0000", "icon": "page_white_picture", "bytes": 879395, "modified": "Mon, 15 Sep 2014 19:20:01 +0000", "size": "858.8 KB", "root": "app_folder", "mime_type": "image/jpeg", "revision": 89}, {"rev": "829d57df1", "thumb_exists": false, "path": "/test.xlsx", "is_dir": false, "client_mtime": "Mon, 08 Sep 2014 12:50:47 +0000", "icon": "page_white_excel", "bytes": 21699, "modified": "Mon, 08 Sep 2014 12:50:47 +0000", "size": "21.2 KB", "root": "app_folder", "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "revision": 8}], "size": "0 bytes"}

A bit of a mess like this. However once you've determind the structure you can create an object structure like this

 Public Class dbFiles

        Private _contents As List(Of dbFile)
        Public Property contents As List(Of dbFile)
            Get
                Return _contents
            End Get
            Set(value As List(Of dbFile))
                _contents = value
            End Set
        End Property

        Private _hash As String
        Public Property hash As String
            Get
                Return _hash
            End Get
            Set(value As String)
                _hash = value
            End Set
        End Property

        Private _thumb_exists As Boolean
        Public Property thumb_exists As Boolean
            Get
                Return _thumb_exists
            End Get
            Set(value As Boolean)
                _thumb_exists = value
            End Set
        End Property

        Private _bytes As Long
        Public Property bytes As Long
            Get
                Return _bytes
            End Get
            Set(value As Long)
                _bytes = value
            End Set
        End Property

        Private _is_dir As Boolean
        Public Property is_dir As Boolean
            Get
                Return _is_dir
            End Get
            Set(value As Boolean)
                _is_dir ...

Brilliant. Thanks.

Two more books I need to pur-chase dang it!

One last question based on these two technologies, is there anything I need to be aware of server-side-requirents wise?